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

Max recursion depth exceeded error #18

Closed
JoshOrndorff opened this issue Oct 29, 2018 · 3 comments
Closed

Max recursion depth exceeded error #18

JoshOrndorff opened this issue Oct 29, 2018 · 3 comments
Assignees

Comments

@JoshOrndorff
Copy link

  • rchain-grpc version:
  • Python version:
  • Operating System:

Description

This issue is opened for @googyduru to seek help on an issue partially described here
rchain/bounties#996 (comment)

@goodyduru Please fill in details and push the code that is causing the problem to github.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
@goodyduru
Copy link

goodyduru commented Oct 29, 2018

Thanks @JoshOrndorff, I tested the code in a jupyter notebook so it's not been merged in the main project. But here is the command:
from rchain_grpc import casper

connection = casper.create_connection(host=RNODE_HOST, port=40403)
print(connection)

And here is the traceback:
1 from rchain_grpc import casper
2
----> 3 connection = casper.create_connection(host=RNODE_HOST, port=40403)
4 print(connection)

~/.local/lib/python3.6/site-packages/rchain_grpc/utils.py in create_connection(stub, channel_fn, host, port)
53
54 channel = channel_fn(f'{host}:{port}')
---> 55 return Connection[stub](channel, stub(channel))
56
57

/usr/lib/python3.6/typing.py in new(cls, *args, **kwds)
1229 raise TypeError("Type Generic cannot be instantiated; "
1230 "it can be used only as a base class")
-> 1231 return _generic_new(cls.next_in_mro, cls, *args, **kwds)
1232
1233

/usr/lib/python3.6/typing.py in _generic_new(base_cls, cls, *args, **kwds)
1195 obj = base_cls.new(origin, *args, **kwds)
1196 try:
-> 1197 obj.orig_class = cls
1198 except AttributeError:
1199 pass

~/.local/lib/python3.6/site-packages/rchain_grpc/utils.py in setattr(self, key, val)
34
35 def setattr(self, key: str, val: Any) -> None:
---> 36 if not self.connected:
37 raise ConnectionClosedException()
38 setattr(self._stub, key, val)

~/.local/lib/python3.6/site-packages/rchain_grpc/utils.py in getattr(self, key)
29
30 def getattr(self, key: str) -> Any:
---> 31 if not self.connected:
32 raise ConnectionClosedException()
33 return getattr(self._stub, key)

... last 1 frames repeated, from the frame below ...

~/.local/lib/python3.6/site-packages/rchain_grpc/utils.py in getattr(self, key)
29
30 def getattr(self, key: str) -> Any:
---> 31 if not self.connected:
32 raise ConnectionClosedException()
33 return getattr(self._stub, key)

RecursionError: maximum recursion depth exceeded.

@pdonorio pdonorio self-assigned this Oct 30, 2018
@pdonorio
Copy link
Contributor

Hello @goodyduru,
from the stacktrace errors are generated from python 3.6, is that the python version that you are using?

If that's the case it is a known problem, we noticed a week ago this issue with that version, while current unittests are running only on python 3.7.

We are in the process of supporting old versions of Python in #5, please follow that issue for updates as 3.6 is next.


In the meantime just for the record, if you use docker, you can get a working environment like this:

git clone https://github.com/proof-media/rchain-notebook.git
cd rchain-notebook/
docker-compose pull
docker-compose up -d
# you have a running notebook 
# but we can quickly debug with
docker-compose exec notes ipython
from rchain_grpc import casper
RNODE_HOST = %env NODE_NAME
connection = casper.create_connection(host=RNODE_HOST, port=40403)
print(connection)

<rchain_grpc.utils.Connection object at 0x7f94504ed828>

@goodyduru
Copy link

Alright, thanks. Will try docker for now.

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

3 participants