amrit3701 / FreeCAD-Reinforcement

Reinforcement Workbench for FreeCAD
https://wiki.freecadweb.org/Reinforcement_Workbench
48 stars 19 forks source link

error "'NoneType' object has no attribute 'setObjectName'" #219

Open Grubuntu opened 3 months ago

Grubuntu commented 3 months ago

As discussed in this thread: https://github.com/FreeCAD/FreeCAD/issues/15218 since a few versions of FreeCAD 0.22 (above 38001), there has been an error which prevent Reinforcement to works correctly :

16:34:05  Traceback (most recent call last):
  File "<string>", line 142, in RunInitGuiPy
  File "C:\Users\Victus\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\InitGui.py", line 31, in <module>
    import RebarTools
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Victus\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\RebarTools.py", line 512, in <module>
    from ArchRebar import _CommandRebar
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\Mod\BIM\ArchRebar.py", line 43, in <module>
    from bimcommands import BimRebar
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\Mod\BIM\bimcommands\__init__.py", line 10, in <module>
    from . import *
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\Mod\BIM\bimcommands\BimClone.py", line 29, in <module>
    import DraftTools
  File "D:\FreeCAD\FreeCAD_weekly-builds-38375-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
    return or...
16:34:05  ----------------------------------------------------------------------------------------------------
16:34:05  During initialization the error "'NoneType' object has no attribute 'setObjectName'" occurred in C:\Users\Victus\AppData\Roaming\FreeCAD\Mod\Reinforcement\.\InitGui.py

I suspect this line of importing an element that would create a conflict but I don't have any other clues: \Mod\BIM\bimcommands__init__.py", line 10, in from . import *

OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38375 (Git)
Build type: Release
Branch: main
Hash: fe702349e848571802c01659668cc4bee519f4c6
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: French/France (fr_FR)
Installed mods: 
  * Reinforcement
luzpaz commented 3 weeks ago

cc @amrit3701