Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem] Unkown command(s), affected Draft functions #13605

Closed
2 tasks done
kenryuS opened this issue Apr 23, 2024 · 7 comments · Fixed by #13611
Closed
2 tasks done

[Problem] Unkown command(s), affected Draft functions #13605

kenryuS opened this issue Apr 23, 2024 · 7 comments · Fixed by #13611
Labels
3rd party: Qt 6 Issue related to Qt 6 OS: Linux Packaging/building Related to building, compiling or packaging FreeCAD

Comments

@kenryuS
Copy link

kenryuS commented Apr 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When I started up the CAD, I saw tons of logs saying "Unknown command '<command name>'". And I saw some error on top of those. Now I cannot use Draft functions.

Full Log:

22:57:04  During initialization the error "'PySide6.QtWidgets.QStatusBar.removeWidget' called with wrong argument types:
  PySide6.QtWidgets.QStatusBar.removeWidget(QPushButton)
Supported signatures:
  PySide6.QtWidgets.QStatusBar.removeWidget(PySide6.QtWidgets.QWidget)" occurred in /usr/lib/freecad/Mod/Tux/InitGui.py
22:57:04  Please look into the log file for further information
22:57:12  Path override failed for key base::DIR_APP_DICTIONARIES and path '/usr/lib/freecad/bin/qtwebengine_dictionaries'
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFrom(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFrom(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFrom(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapFromParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapTo(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapTo(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapTo(self,arg__1:PySide6.QtWidgets.QWidget,arg__2:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToGlobal(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  shibokensupport/signature/parser.py:359: RuntimeWarning: pyside_type_init:_resolve_type

                UNRECOGNIZED:   'typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]'
                OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
                
22:57:12  shibokensupport/signature/parser.py:270: RuntimeWarning: pyside_type_init:_resolve_value

        UNRECOGNIZED:   'PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element'
        OFFENDING LINE: '0:PySide6.QtWidgets.QWidget.mapToParent(self,arg__1:typing.Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element])->PySide6.QtCore.QPointF'
        
22:57:12  'PySide6.QtWidgets.QWidget.setParent' called with wrong argument types:
  PySide6.QtWidgets.QWidget.setParent(QMainWindow)
Supported signatures:
  PySide6.QtWidgets.QWidget.setParent(Optional[PySide6.QtWidgets.QWidget])
  PySide6.QtWidgets.QWidget.setParent(Optional[PySide6.QtWidgets.QWidget], PySide6.QtCore.Qt.WindowType)Error: Initializing one or more of the Draft modules failed, Draft will not work as expected.
22:57:12  Unknown command 'Draft_Fillet'
22:57:12  Unknown command 'Draft_Circle'
22:57:12  Unknown command 'Draft_Ellipse'
22:57:12  Unknown command 'Draft_Rectangle'
22:57:12  Unknown command 'Draft_Polygon'
22:57:12  Unknown command 'Draft_BSpline'
22:57:12  Unknown command 'Draft_Point'
22:57:12  Unknown command 'Draft_Facebinder'
22:57:12  Unknown command 'Draft_ShapeString'
22:57:12  Unknown command 'Draft_Text'
22:57:12  Unknown command 'Draft_Dimension'
22:57:12  Unknown command 'Draft_Label'
22:57:12  Unknown command 'Draft_AnnotationStyleEditor'
22:57:12  Unknown command 'Draft_Move'
22:57:12  Unknown command 'Draft_Rotate'
22:57:12  Unknown command 'Draft_Scale'
22:57:12  Unknown command 'Draft_Mirror'
22:57:12  Unknown command 'Draft_Offset'
22:57:12  Unknown command 'Draft_Trimex'
22:57:12  Unknown command 'Draft_Stretch'
22:57:12  Unknown command 'Draft_Clone'
22:57:12  Unknown command 'Draft_Edit'
22:57:12  Unknown command 'Draft_SubelementHighlight'
22:57:12  Unknown command 'Draft_Join'
22:57:12  Unknown command 'Draft_Split'
22:57:12  Unknown command 'Draft_Upgrade'
22:57:12  Unknown command 'Draft_Downgrade'
22:57:12  Unknown command 'Draft_WireToBSpline'
22:57:12  Unknown command 'Draft_Draft2Sketch'
22:57:12  Unknown command 'Draft_Slope'
22:57:12  Unknown command 'Draft_FlipDimension'
22:57:12  Unknown command 'Draft_Shape2DView'
22:57:12  Unknown command 'Draft_LayerManager'
22:57:12  Unknown command 'Draft_AddNamedGroup'
22:57:12  Unknown command 'Draft_AddToGroup'
22:57:12  Unknown command 'Draft_SelectGroup'
22:57:12  Unknown command 'Draft_AddConstruction'
22:57:12  Unknown command 'Draft_ToggleDisplayMode'
22:57:12  Unknown command 'Draft_WorkingPlaneProxy'
22:57:12  Unknown command 'Draft_Snap_Lock'
22:57:12  Unknown command 'Draft_Snap_Endpoint'
22:57:12  Unknown command 'Draft_Snap_Midpoint'
22:57:12  Unknown command 'Draft_Snap_Center'
22:57:12  Unknown command 'Draft_Snap_Angle'
22:57:12  Unknown command 'Draft_Snap_Intersection'
22:57:12  Unknown command 'Draft_Snap_Perpendicular'
22:57:12  Unknown command 'Draft_Snap_Extension'
22:57:12  Unknown command 'Draft_Snap_Parallel'
22:57:12  Unknown command 'Draft_Snap_Special'
22:57:12  Unknown command 'Draft_Snap_Near'
22:57:12  Unknown command 'Draft_Snap_Ortho'
22:57:12  Unknown command 'Draft_Snap_Grid'
22:57:12  Unknown command 'Draft_Snap_WorkingPlane'
22:57:12  Unknown command 'Draft_Snap_Dimensions'
22:57:12  Unknown command 'Draft_ToggleGrid'
22:57:12  Unknown command 'Draft_Fillet'
22:57:12  Unknown command 'Draft_Circle'
22:57:12  Unknown command 'Draft_Ellipse'
22:57:12  Unknown command 'Draft_Rectangle'
22:57:12  Unknown command 'Draft_Polygon'
22:57:12  Unknown command 'Draft_BSpline'
22:57:12  Unknown command 'Draft_Point'
22:57:12  Unknown command 'Draft_Facebinder'
22:57:12  Unknown command 'Draft_ShapeString'
22:57:12  Unknown command 'Draft_Text'
22:57:12  Unknown command 'Draft_Dimension'
22:57:12  Unknown command 'Draft_Label'
22:57:12  Unknown command 'Draft_AnnotationStyleEditor'
22:57:12  Unknown command 'Draft_Move'
22:57:12  Unknown command 'Draft_Rotate'
22:57:12  Unknown command 'Draft_Scale'
22:57:12  Unknown command 'Draft_Mirror'
22:57:12  Unknown command 'Draft_Offset'
22:57:12  Unknown command 'Draft_Trimex'
22:57:12  Unknown command 'Draft_Stretch'
22:57:12  Unknown command 'Draft_Clone'
22:57:12  Unknown command 'Draft_Edit'
22:57:12  Unknown command 'Draft_SubelementHighlight'
22:57:12  Unknown command 'Draft_Join'
22:57:12  Unknown command 'Draft_Split'
22:57:12  Unknown command 'Draft_Upgrade'
22:57:12  Unknown command 'Draft_Downgrade'
22:57:12  Unknown command 'Draft_WireToBSpline'
22:57:12  Unknown command 'Draft_Draft2Sketch'
22:57:12  Unknown command 'Draft_Slope'
22:57:12  Unknown command 'Draft_FlipDimension'
22:57:12  Unknown command 'Draft_Shape2DView'
22:57:12  Unknown command 'Draft_SetStyle'
22:57:12  Unknown command 'Draft_ApplyStyle'
22:57:12  Unknown command 'Draft_Layer'
22:57:12  Unknown command 'Draft_LayerManager'
22:57:12  Unknown command 'Draft_AddNamedGroup'
22:57:12  Unknown command 'Draft_AddToGroup'
22:57:12  Unknown command 'Draft_SelectGroup'
22:57:12  Unknown command 'Draft_ToggleConstructionMode'
22:57:12  Unknown command 'Draft_AddConstruction'
22:57:12  Unknown command 'Draft_ToggleDisplayMode'
22:57:12  Unknown command 'Draft_ToggleGrid'
22:57:12  Unknown command 'Draft_SelectPlane'
22:57:12  Unknown command 'Draft_WorkingPlaneProxy'
22:57:12  Unknown command 'Draft_Heal'
22:57:12  Unknown command 'Draft_ToggleContinueMode'
22:57:12  Unknown command 'Draft_ShowSnapBar'

Errors When I try to use Draft Functions

23:04:08  Running the Python command 'Draft_Line' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_lines.py", line 68, in Activated
    super(Line, self).Activated(name)
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 292, in Activated
    super(Creator, self).Activated(name, noplanesetup)
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 137, in Activated
    self.ui = Gui.draftToolBar
              ^^^^^^^^^^^^^^^^

module 'FreeCADGui' has no attribute 'draftToolBar'Running the Python command 'Draft_Wire' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_lines.py", line 362, in Activated
    super(Wire, self).Activated(name="Polyline",
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_lines.py", line 68, in Activated
    super(Line, self).Activated(name)
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 292, in Activated
    super(Creator, self).Activated(name, noplanesetup)
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_base_original.py", line 117, in Activated
    App.activeDraftCommand.finish()
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_lines.py", line 138, in finish
    self.removeTemporaryObject()
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_lines.py", line 197, in removeTemporaryObject
    if self.obj:
       ^^^^^^^^

'Line' object has no attribute 'obj'----------------
23:04:25  GuiCommand: Arc by 3 points
23:04:25  Running the Python command 'Draft_Arc_3Points' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_arcs.py", line 498, in Activated
    self.tracker = trackers.arcTracker()
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 544, in __init__
    self.normal = FreeCAD.DraftWorkingPlane.axis
                  ^^^^^^^^^^^^^^^^^^^^^^^^^

module 'FreeCAD' has no attribute 'DraftWorkingPlane'

Full version info

[code]
OS: Arch Linux (KDE/plasmax11)
Word size of FreeCAD: 64-bit
Version: 0.21.2.33771 (Git)
Build type: Release
Branch: makepkg
Hash: b9bfa5c5507506e4515816414cd27f4851d00489
Python 3.11.8, Qt 6.7.0, Coin 4.0.2, Vtk 9.3.0, OCC 7.7.2
Locale: C/Default (C) [ OS: Japanese/Japan (ja_JP) ]
[/code]

Subproject(s) affected?

Draft

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Syres916
Copy link
Contributor

This looks like the Arch Linux packaging team are getting ahead of themselves by using Qt 6.7.0 with FreeCAD 0.21.2.

@luzpaz luzpaz added Packaging/building Related to building, compiling or packaging FreeCAD OS: Linux labels Apr 23, 2024
@luzpaz
Copy link
Contributor

luzpaz commented Apr 23, 2024

In another recent ticket there was a claim made that 21.2 can't be compiled with a a certain version of Qt6 and higher. Need citation for that.

Edit: See #13303

@luzpaz luzpaz added the 3rd party: Qt 6 Issue related to Qt 6 label Apr 23, 2024
@djkato
Copy link

djkato commented Apr 23, 2024

Hello, I +1 this. I couldn't build freecad-git from the AUR cause pyside2, pyside2-tools are now unresolvable depenencies. So I tried all day today to build freecad with QT6 and pyside6, which results in the Draft bench not opening anymore.
"NoneType" object has no attribute "subWindowActivated", /usr/lib/freecad/Mod/Draft/InitGui.py line 157, WorkingPlane.py line 1809. inbetween all the unknown commands.

So AUR/freecad-git doesn't work cuz it doesn't build due to unresolvable deps,
Arch/Extra freecad doesn't work for cuz QT6 & pyside6 breaks Draft bench,
Building myself from source also doesn't work cuz same reason.
Webpack doesn't work cuz it crashes on some weird lib and segfaults.

I think it's time for me to go away from arch...

@adrianinsaval
Copy link
Member

you could always use the appimage or flatpak or install distrobox create an ubuntu image and install freecad or freecad-daily on it

@djkato
Copy link

djkato commented Apr 24, 2024

@adrianinsaval
sorry, said webpack but I meant appimage.

/home/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/linux/AppDir/usr/share/libdrm/amdgpu.ids: No such file or directory
QOpenGLFunctions created with non-current context
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3c770) [0x721a2b25a770]

That is the error I get when trying to open the appimage from AUR/freecad-weekly-appimage
And this is when I run progl freecad

/usr/bin/freecad: line 2: 65813 Segmentation fault      (core dumped) /opt/appimages/freecad.AppImage $1

Today my last resort is distrobox, else I just give up.

@luzpaz
Copy link
Contributor

luzpaz commented Apr 24, 2024

@djkato this is you can also keep backups of FreeCAD daily or weekly that you know work that way when they encounter issues like this you can use them till the codebase is stabilized again

@YakoYakoYokuYoku
Copy link
Contributor

I could replicate your problem, lucky for all of us #13611 fixes this. By the way, Arch merged a patch that I've sent that fixes the star imports which will help this issue and that should hit repos soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party: Qt 6 Issue related to Qt 6 OS: Linux Packaging/building Related to building, compiling or packaging FreeCAD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants