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

__instancecheck__ timeout #87

Open
matthewbradford opened this issue Jul 29, 2020 · 3 comments
Open

__instancecheck__ timeout #87

matthewbradford opened this issue Jul 29, 2020 · 3 comments

Comments

@matthewbradford
Copy link

Hi, I am trying to just start a matlab instance with transplant.Matlab(), but the operation fails due to a recursion depth error.

Do you know what my problem is likely to be? I can run matlab from the command line and zeromq appears to be installed.

Thanks for your hard work!

@bastibe
Copy link
Owner

bastibe commented Jul 30, 2020

Could you show me the origin of the recursion (beginning of the stack trace)?

@matthewbradford
Copy link
Author

matthewbradford commented Jul 30, 2020

With a bit more debugging, I found a different error that is perhaps caught earlier? My original stack trace was too long to fit in my terminal, and this one seems a bit more enlightening. It seems that the attached exception is raised and then transplant sits and waits for messages until it runs out of recursion.

It would seem that this is a zmq installation/path problem, so not likely to be your problem.

ERROR:root:thar she blows
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    mat = transplant.Matlab()
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 542, in __init__
    msgformat, zmq_address, self._locate_libzmq()
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 711, in _locate_libzmq
    raise RuntimeError('could not locate libzmq for Matlab')
RuntimeError: could not locate libzmq for Matlab

For reference: the original trace

  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 180, in _wait_socket
    if self.process.poll() is not None:
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 637, in __getattr__
    return self._get_global(name)
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 92, in _get_global
    response = self.send_message('get_global', name=name)
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 149, in send_message
    kwargs = self._encode_values(kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transplant/transplant_master.py", line 187, in _encode_values
    if isinstance(data, (np.ndarray, np.number)):
RecursionError: maximum recursion depth exceeded in __instancecheck__

@bastibe
Copy link
Owner

bastibe commented Jul 30, 2020

How and where did you install libzmq?

Also, I don't understand how you got into the recursion. You shouldn't have a valid Matlab object if it can't find libzmq.

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