Python function errors in Qtdragon with Linuxcnc 2.9

More
4 years 3 months ago #247616 by Eyecon
I have a fresh install from a compiled linuxcnc 2.9 downloaded a couple of days ago. When I try to use the QTDragon sim examples or with any of my INI files, the interface launches but I get a lot of python3 errors related to drawing functions pop up.  Like the below:



Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 53, in paintEventself.draw_background(painter, event, w)File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 69, in draw_backgroundfp = QPoint(center.x() - w/4, center.y() - w/4)TypeError: arguments did not match any overloaded call:QPoint(): too many argumentsQPoint(int, int): argument 1 has unexpected type 'float'QPoint(QPoint): argument 1 has unexpected type 'float'


OR

Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 567, in paintEventself.paintIndicator()File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 609, in paintIndicatorp.drawEllipse(x, y, self._diameter - 1, self._diameter - 1)TypeError: arguments did not match any overloaded call:drawEllipse(self, QRectF): argument 1 has unexpected type 'float'drawEllipse(self, QRect): argument 1 has unexpected type 'float'drawEllipse(self, int, int, int, int): argument 1 has unexpected type 'float'drawEllipse(self, Union[QPointF, QPoint], float, float): argument 1 has unexpected type 'float'drawEllipse(self, QPoint, int, int): argument 1 has unexpected type 'float'



Any ideas?



 

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

More
4 years 3 months ago #247634 by cmorley
Can you tell me more about your linux system?
Ot seems the drawing routines changed at some point in the pyqt libraries.

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

More
4 years 3 months ago #247643 by Eyecon
Running bulleye where I downloaded and compiled my own 2.9 package. All dependencies were downloaded based on the dpk tools as part building the linuxcnc deb packages. I modified all the python widgets by adding explicit type casting to int (using the int() function). This seems to have resolved the issue however I keep getting segmentation errors when I exit:


qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 31034, resource id: 9583230, major code: 40 (TranslateCoords), minor code: 0
/usr/bin/linuxcnc: line 963: 17340 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS

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

More
4 years 3 months ago #247660 by cmorley
yes seg error when closing sees to be a common complaint. I have npt found the answer yet, but seems harmless other then annoying.

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

More
4 years 3 months ago #248219 by Eyecon
Just wanted to leave this update here: there is no need to modify any of the widget drawing function calls if using python 3.9, the issue seems to be specific to the version of the libraries of python 3.10
The following user(s) said Thank You: cmorley

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

More
4 years 2 months ago #250632 by Roguish
Eyecon.
if you could, check out my problem....

forum.linuxcnc.org/qtvcp/46757-qtdragon-...n-12-bookworm#250629

did you revert from python 3.10 to python 3.9 ???
if so, how ???

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

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