I was following https://github.com/singnet/reputation-simulation/blob/master/README.md and ran into some problems.
sudo bash scripts/install (otherwise not enough permissions) finishes with an error, which, to my mind, leaves 'reputation' package not installed.
Using /usr/local/lib/python3.6/dist-packages
Finished processing dependencies for reputation-simulation==0.0.1
+ rm -rf src
+ pip3 install -e git+https://github.com/singnet/reputation.git#egg=reputation
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
- Running
python3 reputation-simulation/snsim/reputation_simulation/ReputationSim.py reputation-simulation/unratedDenomConserv5SAP10.json fails, because there is no file unratedDenomConserv5SAP10.json in the repo and the directory structure seem to be different. Following another readme in reputation-simulation/, I run it with another file:
python3 reputation-simulation/snsim/reputation_simulation/ReputationSim.py reputation-simulation/snsim/noUnratednoDenomConserv5SAP182.json
This one fails, because it tries to call reputation server on localtest.com:1181 which obviously is not yet running:
request http://localtest.com:1181/?my+name+john%40doe.org%2C+surname+john%40doe.org%2C+email+john%40doe.org. <class 'requests.exceptions.ConnectionError'>
Specify proper url to Aigents server or run it locally, eg.
java -cp ./bin/Aigents.jar:./bin/* net.webstructor.agent.Farm store path './al_test.txt', cookie domain localtest.com, console off &
or
sh aigents_server_start.sh
Traceback (most recent call last):
File "reputation-simulation/snsim/reputation_simulation/ReputationSim.py", line 646, in <module>
main()
File "reputation-simulation/snsim/reputation_simulation/ReputationSim.py", line 617, in main
'john@doe.org','q', 'a', False, dirname, True))
File "/home/kabir/reputation/reputation/reputation/aigents_reputation_api.py", line 47, in __init__
self.create_session()
File "/home/kabir/reputation/reputation/reputation/aigents_reputation_api.py", line 65, in create_session
assert output == 'What your secret question, secret answer?', 'Expecting secret question, secret answer'
AssertionError: Expecting secret question, secret answer
request http://localtest.com:1181/?Your+trusts+no+john%40doe.org. <class 'requests.exceptions.ConnectionError'>
Specify proper url to Aigents server or run it locally, eg.
java -cp ./bin/Aigents.jar:./bin/* net.webstructor.agent.Farm store path './al_test.txt', cookie domain localtest.com, console off &
or
sh aigents_server_start.sh
Exception ignored in: <bound method AigentsAPIReputationService.__del__ of <reputation.aigents_reputation_api.AigentsAPIReputationService object at 0x7f9c74853ba8>>
Traceback (most recent call last):
File "/home/kabir/reputation/reputation/reputation/aigents_reputation_api.py", line 53, in __del__
self.close_session()
File "/home/kabir/reputation/reputation/reputation/aigents_reputation_api.py", line 74, in close_session
assert output.split()[0] == 'Ok.', 'Expecting Ok'
AssertionError: Expecting Ok
This is because parameters.use_java is set to true by default; so i set it to false and try again, hoping that it will call the python reputation service which throws the following error:
Traceback (most recent call last):
File "reputation-simulation/snsim/reputation_simulation/ReputationSim.py", line 646, in <module>
main()
File "reputation-simulation/snsim/reputation_simulation/ReputationSim.py", line 615, in main
) if not config['parameters']['use_java']else AigentsAPIReputationService(
NameError: name 'PythonReputationService' is not defined
This seem to be related to commented out import statement on line 20 in the reputation-simulation/snsim/reputation_simulation/ReputationSim.py file. After uncommenting I get:
kabir@Ubuntu-1804-bionic-64-minimal:~/reputation$ python3 reputation-simulation/snsim/reputation_simulation/ReputationSim.py reputation-simulation/snsim/noUnratednoDenomConserv5SAP182.json
Traceback (most recent call last):
File "reputation-simulation/snsim/reputation_simulation/ReputationSim.py", line 20, in <module>
from reputation import PythonReputationService
ImportError: cannot import name 'PythonReputationService'
Now it seems we are in square zero as python reputation service cannot be found because the reputation package was not correctly installed in the first place...
Could you please guide me into direction of solving the above?
I was following https://github.com/singnet/reputation-simulation/blob/master/README.md and ran into some problems.
sudo bash scripts/install(otherwise not enough permissions) finishes with an error, which, to my mind, leaves 'reputation' package not installed.python3 reputation-simulation/snsim/reputation_simulation/ReputationSim.py reputation-simulation/unratedDenomConserv5SAP10.jsonfails, because there is no fileunratedDenomConserv5SAP10.jsonin the repo and the directory structure seem to be different. Following another readme in reputation-simulation/, I run it with another file:This one fails, because it tries to call reputation server on
localtest.com:1181which obviously is not yet running:This is because
parameters.use_javais set totrueby default; so i set it tofalseand try again, hoping that it will call the python reputation service which throws the following error:This seem to be related to commented out import statement on line 20 in the reputation-simulation/snsim/reputation_simulation/ReputationSim.py file. After uncommenting I get:
Now it seems we are in square zero as python reputation service cannot be found because the reputation package was not correctly installed in the first place...
Could you please guide me into direction of solving the above?