"KeyError" suddenly appears after moving a limitswitch

More
22 Jul 2025 21:25 - 06 Aug 2025 19:17 #332206 by SebastianM
"KeyError" suddenly appears was created by SebastianM
Hey guys!
My linuxcnc / probebasic started to show a weird behaviour today.
After I start the system and home the machine, I get a popup saying "KeyError" _everytime_ when I jog any of the axes.
I can ignore that message, but it comes back everyime I jog again (no matter if via keyboard, softkey or pendant).

BUT - what I found out... as soon as I zero one of the axes (or all three), the error is gone.
I have not changed anything in my (software) config the last week, BUT I have modified my x axis yesterday and therefore moved the limitswitch a bit. 
Can this somehow be related? The popup says somewthing with "...active.WCSoffset..."... maybe some cached value doesnt fit anymore after I moved that switch?


Thx in advance!
Attachments:
Last edit: 06 Aug 2025 19:17 by SebastianM.

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

More
23 Jul 2025 18:18 #332233 by langdons
Python's error messages are so unhelpful.

:(

Did you change anything?

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

More
24 Jul 2025 20:28 #332280 by SebastianM
No. I didn’t. 

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

More
25 Jul 2025 19:28 #332325 by andypugh
"Key Error" means that the system is looking in the object returned by getWcsOffsets() call for an item that doesn't exist.

It looks like, for whatever reason, the getActiveWcsIndex() call is returning -1. There isn't a -1-th WCS, so it returns an error message.

This looks like qtPyVcp isn't handling the case when the apparent WCs is zero properly.

github.com/kcjengr/qtpyvcp/blob/main/src...c_datasource.py#L194

I think you should raise this as a bug:
. github.com/kcjengr/qtpyvcp/issues

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

More
26 Jul 2025 00:19 #332344 by Lcvette
Weird.. Never seen that before. Have you setup the latest in settings for the last update? We changed a lot with offset table display, drop display and jog key display. If those in settings and yaml settings require some updates. If you would double check the docs and your config if you are running the development version and just make sure you caught all the updates.

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

More
04 Aug 2025 00:02 #332776 by SebastianM
Hi, sorry for the late reply but I was travelling.
I havent run any updates since I installed PB (never change a running system). 

What exactly do you want me do double check?

This is my config..
github.com/SebastianMusser/LinuxCNC/

regards!

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

More
04 Aug 2025 02:48 #332784 by Lcvette
I've got nothing, I've not seen that write and cannot produce it here to troubleshoot. I would update to the develop branch and update your config files. Start there so at least we know you're on a known working version.

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

More
04 Aug 2025 13:08 #332818 by SebastianM
So you are saying that the latest stable version is not known to work? It worked great for me...

Shouldnt I try to update the my stable branch first?

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

More
04 Aug 2025 17:46 #332832 by Lcvette
the latest stable version DOES work, but it is not working for you currently. what i am saying is i have no idea why you are getting that error and i cannot reproduce it here, so without knowing where or why that error is happening for you specifically and not here or being complained about elsewhere, the next logical step would be to update and make sure its not something wrong with your install or a change made that you may not remember making or be aware had effect that was made without your knowledge.

Before i spend any time troubleshooting with such little data on the problem, it would be prudent to know for certain that it's in probe basic/qtpyvcp and not an issue elsewhere.

I would also test the probe basic sim to see if the issue is there as well, if it is then it is probably an internal error issue and not a configuration issue. from there we can figure next steps. but identifying where the issue stems from is in my opinion the first step, so i would test in the sim and see if you can reproduce the error there. if not, then its a configuration change, maybe a stray typo from your editing? if you can reproduce in the sim, then i would say the next step is removing and reinstalling the stable branch and testing or testing, or testing the develop version. the develop version has file changes for the work coordinate system table and the dro's which may be a resolution. it also has a fix for running on linuxcnc version 2.10. i'm not sure what version you are running on, but if it is 2.10 it NEEDS the develop version.

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

More
05 Aug 2025 01:28 #332860 by SebastianM
Alright, understood.
Today I spent some time with my cnc. I setup a new machine in LinuxCNC, and now I have two setups.. one is "good", and the other one shows this issue. 
What I found out - when I startup the "bad" machine and open the "probing" tab, none of the work offsets at the top is selected.
When I start the "good" machine, G54 always is preselected.

No idea if this makes sense or helps, but it fits to the error message imho...

 
Attachments:

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

Moderators: KCJLcvette
Time to create page: 0.183 seconds
Powered by Kunena Forum