baking-bad / pytezos

🐍 Python SDK for Tezos | Michelson VM in Python
https://pytezos.org
MIT License
112 stars 38 forks source link

AttributeError - pytezos sandbox #315

Closed SukiCZ closed 2 years ago

SukiCZ commented 2 years ago

When running pytezos sandbox I get the error.

Pulling image bakingbad/sandboxed-node:v13.0-1
Container started: 3d8031f69f
Traceback (most recent call last):
  File "/home/suki/.virtualenvs/pytezos/bin/pytezos", line 5, in <module>
    cli()
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/suki/.virtualenvs/pytezos/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/suki/projects/pytezos/src/pytezos/cli/cli.py", line 364, in sandbox
    if not node.wait_for_connection():
AttributeError: 'NoneType' object has no attribute 'wait_for_connection'

The sandbox function calls with SandboxedNodeContainer(...) in which __enter__ function returns from run which is None

SukiCZ commented 2 years ago

@droserasprout see related PR #316

droserasprout commented 2 years ago

Thank you!