-
Notifications
You must be signed in to change notification settings - Fork 37
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
TypeError: get_interpreter() returned NULL #82
Comments
I think this might be related to that issue: (my stretch image runs python 2.7.13-2) |
It seems like the tkapp interpaddr was changed to return a Long. However this patch fixes it for me:
|
According to your post, you are trying to build on stretch running a defunct xenomai2 kernel. If this only happens then, I would be loathe to change the codebase for such a corner case. |
I have just cloned and built machinekit from scratch on Buster/sid (amd64) and run the Axis sim_mm on the title code without incident. |
I am building machinekit on a beagleboneblack using the armhf stretch image. And you are right, I am wondering why this happens only for me.. Anyway, it seems that the python tkinter stuff was changed a very long time ago to return a Long based on a void pointer: Casting it back by using PyLong_AsVoidPtr() seems to be plausible to me. Going the way from int to long and then casting the long back to the Tcl_Interp pointer seems over complicated. However I still do not get why this does not throw an out of range error and the asLong function does... Both should be 32bits?! |
Hi!
I am trying to build my own machinekit under a plain stretch based debian image.
I am struggling issues with getting the following error:
I traced it back to the file src/emc/usr_intf/axis/extensions/_toglmodule.c.
This diff adds some more debug info (might be good to have it in the master branch as well):
The change with the checking of == -1 is necessary as the PyInt_AsLong documentation says just checking for -1 is not correct.
Anyway, that is not my issue.... Running this modified code gives me this error reason:
OverflowError: Python int too large to convert to C long
Really strange... I have no idea of the internals of PyInt_AsLong but as I was curious and I tried to replace it by:
interpaddr = PyInt_AsUnsignedLongLongMask(interpaddrobj);
With this fix axis starts up just fine and it looks like all is working as expected.
I am sure this is not the correct way of doing it.
Maybe a python guru can point me in the right direction?
Simon
The text was updated successfully, but these errors were encountered: