(solved) python error on startup

  • peterdownunder
  • Away
  • Junior Member
  • Junior Member
More
21 Jul 2025 07:14 - 21 Jul 2025 07:22 #332100 by peterdownunder
(solved) python error on startup was created by peterdownunder
 

File Attachment:

File Name: change.ngc
File Size:2 KB
Went to startup linuxcnc today and am getting the following error

Found file(REL): ./custom.hal
initialize: module '/home/peter/cnc/taigmesa/python/toplevel.py' init failed:
Traceback (most recent call last):

File "/home/peter/cnc/taigmesa/python/toplevel.py", line 19, in <module>
import remap

File "python/remap.py", line 19, in <module>
from stdglue import *

File "python/stdglue.py", line 59

print "change_prolog: Toolchanger soft fault %d" % int(self.params[5601])

^

SyntaxError: invalid syntax

Interp ctor: can't instantiate Python plugin
initialize: module '/home/peter/cnc/taigmesa/python/toplevel.py' init failed:
Traceback (most recent call last):

File "/home/peter/cnc/taigmesa/python/toplevel.py", line 19, in <module>
import remap

File "python/remap.py", line 19, in <module>
from stdglue import *

File "python/stdglue.py", line 59

print "change_prolog: Toolchanger soft fault %d" % int(self.params[5601])

^

SyntaxError: invalid syntax

Python plugin configure() failed, status = -11
Python plugin required for prolog=, but not available: 78:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
Python plugin required for epilog=, but not available: 78:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog

emc/task/emctaskmain.cc 3084: can't initialize interpreter 

If I comment out the
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
from my ini file all is well, but obviously no tool change.
With it in it eventually starts up after the error above but is unusable.

Chacking against git history show no significant changes that I can see.

Linuxcnc version 2.9.3
UI is Gmoccapy
Python version is 3.7.3

Unsure where to start.
Attachments:
Last edit: 21 Jul 2025 07:22 by peterdownunder.

Please Log in or Create an account to join the conversation.

  • peterdownunder
  • Away
  • Junior Member
  • Junior Member
More
21 Jul 2025 07:28 - 21 Jul 2025 07:29 #332102 by peterdownunder
Replied by peterdownunder on topic (solved) python error on startup
Also just realised that when I start with the remap line in the ini file commented out the error still occurs, without the 2 lines after "Python plugin configure() failed, status = -11"
Last edit: 21 Jul 2025 07:29 by peterdownunder.

Please Log in or Create an account to join the conversation.

More
21 Jul 2025 11:08 #332112 by Aciera
Replied by Aciera on topic (solved) python error on startup
As the error message indicates:
print "change_prolog: Toolchanger soft fault %d" % int(self.params[5601])

Is invalid syntax for python 3. Possibly you imported the 'nc_files' folder from an older version of linuxcnc?

You might want to replace your "nc_files/remap_lib" folder with the one available here:

github.com/LinuxCNC/linuxcnc/tree/2.9/nc_files/remap_lib
The following user(s) said Thank You: peterdownunder

Please Log in or Create an account to join the conversation.

  • peterdownunder
  • Away
  • Junior Member
  • Junior Member
More
22 Jul 2025 06:41 #332161 by peterdownunder
Replied by peterdownunder on topic (solved) python error on startup
Thanks that fixed it. Unsure what exactly happened, but happy to have it fixed

 

Please Log in or Create an account to join the conversation.

  • peterdownunder
  • Away
  • Junior Member
  • Junior Member
More
22 Jul 2025 06:44 #332162 by peterdownunder
Replied by peterdownunder on topic (solved) python error on startup
as an aside, how do i mark this as answered ??

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
22 Jul 2025 15:03 #332187 by tommylight
Replied by tommylight on topic (solved) python error on startup

as an aside, how do i mark this as answered ??

Done, thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum