[solved] Auto Tool Measurement

More
09 Jul 2024 08:16 #304734 by meme
Auto Tool Measurement was created by meme
Hi, I have a problem setting the probe. I updated the .ini file (which I attach) following the guide. the program does not start, there is the following error:
Traceback (most recent call last):
  File "/usr/share/qtvcp/screens/qtdragon/qtdragon_handler.py", line 700, in slider_rapid_changed
    rapid = (float(value) / 100) * self.factor
                                   ^^^^^^^^^^^
AttributeError: 'HandlerClass' object has no attribute 'factor'
 
Attachments:

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

More
10 Jul 2024 16:32 #304829 by MarkoPolo
Replied by MarkoPolo on topic Auto Tool Measurement
You put the topic in the wrong category, it should be "qtvcp"
What version of qtdragon are you using, is there such a variable in the qtdragon_hadler.py file "self.factor = 1.0"?
Attachments:

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

More
10 Jul 2024 17:09 #304835 by tommylight
Replied by tommylight on topic Auto Tool Measurement

....it should be "qtvcp"

Moved, thank you.

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

More
11 Jul 2024 07:17 #304868 by meme
Replied by meme on topic Auto Tool Measurement
Hello, sorry for using the wrong section and thank you for your answer.
The  system I use is this one:
Linuxcnc: 2.9.0~pre1 git20230208.f1270d6ed7
System:
System:
LMDE 6 Faye 6.0.4

Kernel 6.1.0-22-rt-amd64

Pentium© Dual-Core
CPU      
E5400  @ 2.70GHz × 2
I attach the qtdragon_hadler.py file  
Attachments:

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

More
11 Jul 2024 08:05 #304872 by MarkoPolo
Replied by MarkoPolo on topic Auto Tool Measurement
This is quite an old version of the file. Update linuxcnc , or try adding "self.factor = 1.0" as in the screenshot.

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

More
11 Jul 2024 09:28 #304885 by meme
Replied by meme on topic Auto Tool Measurement
I updated linuxcnc, I edited the file as you suggested:

def slider_rapid_changed(self, value):
rapid = (float(value) / 100) * self.factor = 1.0
self.w.lbl_max_rapid.setText("{:4.0f}".format(rapid))

Now the error is as follow:


Traceback (most recent call last):
File "/usr/bin/qtvcp", line 508, in <module>
_qtvcp = QTVCP()
^^^^^^^
File "/usr/bin/qtvcp", line 251, in __init__
window.load_extension(opts.usermod)
File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 265, in load_extension
methods, self[obj].handler_module, self[obj].handler_instance = self._load_handlers([handlerpath], self.halcomp, self[obj])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 293, in _load_handlers
mod = __import__(basename)
^^^^^^^^^^^^^^^^^^^^
File "/usr/share/qtvcp/screens/qtdragon/qtdragon_handler.py", line 700
rapid = (float(value) / 100) * self.factor = 1.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot assign to expression

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

More
11 Jul 2024 10:38 #304894 by MarkoPolo
Replied by MarkoPolo on topic Auto Tool Measurement
Not like that. Don't change anything in this line "rapid = (float(value) / 100) * self.factor"
If you have updated linuxcnc it is possible that it will work.
You should have checked if there is a line "self.factor = 1.0" in the global variables section, as in the screenshot
Attachments:

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

More
11 Jul 2024 11:13 #304896 by meme
Replied by meme on topic Auto Tool Measurement
I folllowed your suggestion and now I have a different error:



Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qtvcp/widgets/status_slider.py", line 142, in _action
ACTION.SET_RAPID_RATE(value)
File "/usr/lib/python3/dist-packages/qtvcp/qt_action.py", line 400, in SET_RAPID_RATE
self.cmd.rapidrate(rate / 100.0)
KeyboardInterrupt

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

More
11 Jul 2024 19:41 #304942 by meme
Replied by meme on topic [solved] Auto Tool Measurement
HI,
with the update to version 2.9.2 the problem is solved.

Thank you for your time

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

Moderators: cmorley
Time to create page: 0.156 seconds
Powered by Kunena Forum