Startup Error - 'pycall(remap.change_prolog) failed'
22 May 2019 09:49 #134563
by HueyHQ
Startup Error - 'pycall(remap.change_prolog) failed' was created by HueyHQ
Hi All,
I have attempted to do a remap based on the manual_toolchange sample config, but I am getting the above error when starting up LinuxCNC (see attached pic). Doesn't seem to matter what G-code I load.
I used the stdglue.py for prolog and epilog, so imagine the mistake is somewhere in my config and not in the change_prolog as the error suggests.
I get this snippet from the terminal:
Suggests something is wrong with my Python?
Could someone please have a look and point out where I've gone horribly wrong! I am still new to all of this!
I have attempted to do a remap based on the manual_toolchange sample config, but I am getting the above error when starting up LinuxCNC (see attached pic). Doesn't seem to matter what G-code I load.
I used the stdglue.py for prolog and epilog, so imagine the mistake is somewhere in my config and not in the change_prolog as the error suggests.
I get this snippet from the terminal:
hm2_5i25.0: initialized AnyIO board at 0000:05:00.0
Found file(REL): ./custom.hal
/home/cnc/linuxcnc/configs/busellato/busellato.ini:61: executing 'import sys
sys.path.insert(0,"./python")'
/home/cnc/linuxcnc/configs/busellato/busellato.ini:63: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
PythonPlugin: Python '2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]'
/home/cnc/linuxcnc/configs/busellato/busellato.ini:61: executing 'import sys
sys.path.insert(0,"./python")'
/home/cnc/linuxcnc/configs/busellato/busellato.ini:63: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
PythonPlugin: Python '2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]'
is_callable(__init__) = FALSE
note: MAXV max: 33.333 units/sec 2000.000 units/min
note: LJOG max: 33.333 units/sec 2000.000 units/min
note: LJOG default: 16.667 units/sec 1000.000 units/min
note: jog_order='XYZ'
note: jog_invert=set([])
/home/cnc/linuxcnc/configs/busellato/busellato.ini:61: executing 'import sys
sys.path.insert(0,"./python")'
/home/cnc/linuxcnc/configs/busellato/busellato.ini:63: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
PythonPlugin: Python '2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]'
is_callable(__init__) = FALSE
is_callable(oword.tool_change) = FALSE
call(remap.change_prolog):
KeyError: ('change_prolog',)
Suggests something is wrong with my Python?
Could someone please have a look and point out where I've gone horribly wrong! I am still new to all of this!
Please Log in or Create an account to join the conversation.
22 May 2019 10:37 - 22 May 2019 11:32 #134564
by bevins
Replied by bevins on topic Startup Error - 'pycall(remap.change_prolog) failed'
Where is your TopLevel.py?
Looks to me like a path issue to me.
Also, there was a fix a while back for the change_epilog. You should have INTERP_EXECUTE_FINISH in your change_epilog, if you do make sure you have no return INTERP_error or OK. If you do replace return with yield and keep the INTERP. I think this caused that error also. This was fixed and the std glue was changed in a bug somewhere. Usually this get an exception during generator call but I don't see it in your error capture, so this may not be the issue. Worth a look though.
Looks to me like a path issue to me.
Also, there was a fix a while back for the change_epilog. You should have INTERP_EXECUTE_FINISH in your change_epilog, if you do make sure you have no return INTERP_error or OK. If you do replace return with yield and keep the INTERP. I think this caused that error also. This was fixed and the std glue was changed in a bug somewhere. Usually this get an exception during generator call but I don't see it in your error capture, so this may not be the issue. Worth a look though.
Last edit: 22 May 2019 11:32 by bevins.
Please Log in or Create an account to join the conversation.
22 May 2019 20:20 #134606
by HueyHQ
Replied by HueyHQ on topic Startup Error - 'pycall(remap.change_prolog) failed'
Thanks, mate.
Although based on the manual_toolchange Oword procedure, I actually followed your BS346 toolchange config you'd kindly provided on a post, as I have a similar tool-head setup where the tools are pneumatic-actuated. It has helped a lot to figure out what I needed to do, so I can't thank you enough! Wanted to try the Oword method as mine is a lot simpler than yours, with no rack change.
My toplevel.py is there in my config directory as a subfolder called 'python'. I have a relative path, as per the manual_toolchange config, but I see you have an absolute path in your BS_346.ini - I might try that.
I'll check your suggestion about the the change_epilog; I did see there was a difference between the stdglue.py in your config, and the one provided by the 2.8 build, but didn't know what it meant, so thanks again for your explanation.
Jon
Although based on the manual_toolchange Oword procedure, I actually followed your BS346 toolchange config you'd kindly provided on a post, as I have a similar tool-head setup where the tools are pneumatic-actuated. It has helped a lot to figure out what I needed to do, so I can't thank you enough! Wanted to try the Oword method as mine is a lot simpler than yours, with no rack change.
My toplevel.py is there in my config directory as a subfolder called 'python'. I have a relative path, as per the manual_toolchange config, but I see you have an absolute path in your BS_346.ini - I might try that.
I'll check your suggestion about the the change_epilog; I did see there was a difference between the stdglue.py in your config, and the one provided by the 2.8 build, but didn't know what it meant, so thanks again for your explanation.
Jon
Please Log in or Create an account to join the conversation.
22 May 2019 21:09 - 22 May 2019 21:12 #134618
by bevins
Replied by bevins on topic Startup Error - 'pycall(remap.change_prolog) failed'
The Standard glue in my remap is not used. Pure python wont work with it because there is an issue with executing three python scripts in sequence in a remap. I did the stuff standard glue does directly in the remap function as you could probably tell. I left the change epilog and prolog functions, but not using them.
I remember having issues with relative path so that's why I went with absolute.
No problem, glad I could be of some assistance. I have received an enormous amount of help here, so I love to give back.
I remember having issues with relative path so that's why I went with absolute.
No problem, glad I could be of some assistance. I have received an enormous amount of help here, so I love to give back.
Last edit: 22 May 2019 21:12 by bevins.
Please Log in or Create an account to join the conversation.
22 May 2019 22:40 #134628
by HueyHQ
Replied by HueyHQ on topic Startup Error - 'pycall(remap.change_prolog) failed'
You wouldn't believe it - I changed to an absolute path, got different errors, played around a bit, tried changing it back to my original relative paths, and it works!
Must have copied a dodgy character somewhere along the way.
Must have copied a dodgy character somewhere along the way.
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds