Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_sha3.sha3() return Attribute Error #6

Open
szmontsaroff opened this issue Jan 18, 2018 · 3 comments
Open

_sha3.sha3() return Attribute Error #6

szmontsaroff opened this issue Jan 18, 2018 · 3 comments

Comments

@szmontsaroff
Copy link

After install sha3, and running it with a received package under Mac OS 10.13.2, when the calling library reference
self._s = _sha3.sha3()
AttributeError: module '_sha3' has no attribute 'sha3'

Below is the stack dump

Traceback (most recent call last):
File "/usr/local/bin/indy", line 4, in
import('pkg_resources').run_script('indy-node==1.2', 'indy')
File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 748, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 1517, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.6/site-packages/indy_node-1.2-py3.6.egg/EGG-INFO/scripts/indy", line 40, in
from indy_client.cli.cli import IndyCli
File "/usr/local/lib/python3.6/site-packages/indy_node-1.2-py3.6.egg/indy_client/cli/cli.py", line 27, in
from indy_client.agent.walleted_agent import WalletedAgent
File "/usr/local/lib/python3.6/site-packages/indy_node-1.2-py3.6.egg/indy_client/agent/walleted_agent.py", line 7, in
from indy_client.agent.agent import Agent
File "/usr/local/lib/python3.6/site-packages/indy_node-1.2-py3.6.egg/indy_client/agent/agent.py", line 12, in
from indy_client.client.client import Client
File "/usr/local/lib/python3.6/site-packages/indy_node-1.2-py3.6.egg/indy_client/client/client.py", line 9, in
from plenum.client.client import Client as PlenumClient
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/plenum/client/client.py", line 49, in
from state.pruning_state import PruningState
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/state/pruning_state.py", line 6, in
from state.trie.pruning_trie import BLANK_ROOT, Trie, BLANK_NODE,
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/state/trie/pruning_trie.py", line 196, in
BLANK_ROOT = sha3rlp(BLANK_NODE)
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/state/util/utils.py", line 328, in sha3rlp
return sha3(rlp.encode(x))
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/state/util/utils.py", line 159, in sha3
return sha3_256(to_string(seed))
File "/usr/local/lib/python3.6/site-packages/indy_plenum-1.2.29-py3.6.egg/state/util/utils.py", line 8, in sha3_256
return _sha3.sha3_256(x).digest()
File "/usr/local/lib/python3.6/site-packages/sha3-0.2.1-py3.6-macosx-10.13-x86_64.egg/sha3/init.py", line 97, in sha3_256
return SHA3256(s)
File "/usr/local/lib/python3.6/site-packages/sha3-0.2.1-py3.6-macosx-10.13-x86_64.egg/sha3/init.py", line 30, in init
self._s = _sha3.sha3()
AttributeError: module '_sha3' has no attribute 'sha3'

@bjornedstrom
Copy link
Owner

Hi.

Try to import sha3 instead.

Do

self._s = sha3.sha3() # no underscore

instead of

self._s = _sha3.sha3()

The module with the underscore in front is the low level C module and should not be called directly

Take care

@szmontsaroff
Copy link
Author

szmontsaroff commented Jan 18, 2018 via email

@szmontsaroff
Copy link
Author

szmontsaroff commented Jan 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants