FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.76k stars 4.05k forks source link

Addon Manager "Apply Updates" button breaks alot of workbenches with old BIM 'update' #16683

Open pixelwaster opened 1 month ago

pixelwaster commented 1 month ago

Is there an existing issue for this?

Problem description

This took a long time to run down because it would show up intermittently going back over several builds (both rc1s and two dev0.22). It stopped happening when BIM was no longer the new BIM integrated version.

The Addon Manager Apply Updates button removes the new BIM and replaces it with old BIM. This is done automatically with no way to turn it off or bypass the updates. It also updates Help and Plot.

Maybe include a your version and a new version columns with a checkbox (default not enabled).

image

Of course you are asked to restart and when you do there is a warning about a folder renamed to prevent conflict please restart. When you do that restart, everything looks good but benches are no longer working.

image

Full version info

OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 1.0.0RC1.38642 (Git)
Build type: Release
Branch: (HEAD detached at 1.0rc1)
Hash: 60a251354e203bdb924e2190fb9f5e18b48d7362
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods: 
  * AddonManager
  * Assembly
  * BIM
  * btl 0.9.9
  * CAM
  * CurvedShapes 1.0.9
  * Curves 0.6.47
  * Draft
  * FeedsAndSpeeds 0.5.0
  * Fem
  * Help 1.0.3
  * Idf
  * Import
  * Inspection
  * lattice2 1.0.0
  * Material
  * Measure
  * Mesh
  * MeshPart
  * OpenSCAD
  * Part
  * PartDesign
  * Plot 2022.4.17
  * Points
  * ReverseEngineering
  * Robot
  * sheetmetal 0.4.26
  * Show
  * Silk 0.1.5
  * Sketcher
  * Spreadsheet
  * Start
  * Surface
  * TechDraw
  * Test
  * Tux
  * Web

Subproject(s) affected?

BIM

Anything else?

No response

Code of Conduct

chennes commented 1 month ago

@yorikvanhavre what is BIM doing when it sees the old BIM WB? The Addon Manager's update mechanism doesn't understand name changes, so I might need to code around this.

pixelwaster commented 1 month ago

I get a Workbench Failure popup with an OK button. Says - " No module named 'Arch_rc' " There is no new BIM folder.

Report window--

13:42:25  No module named 'Arch_rc'
13:42:25  Traceback (most recent call last):
  File "D:\FreeCAD_1.0.0RC1-conda-Windows-x86_64-py311\Mod\BIM021\.\InitGui.py", line 77, in Initialize
    import DraftTools
  File "D:\FreeCAD_1.0.0RC1-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_1.0.0RC1-conda-Windows-x86_64-py311\Mod\Draft\DraftTools.py", line 49, in <module>
    import Draft
  File "D:\FreeCAD_1.0.0RC1-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_1.0.0RC1-conda-Windows-x86_64-py311\Mod\Draft\Draft.py", line 53, in <module>
    from draftutils.utils import ARROW_TYPES as arrowtypes
  File "D:\FreeCAD_1.0.0RC1-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_1.0.0RC1-conda-Windows-x86_64-py311\Mod\Draft\draftutils\utils.py", line 42, in <module>
    from draftutils import params
  File "D:\FreeCAD_1.0.0RC1-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_1.0.0RC1-conda-Windows-x86_64-py311\Mod\Draft\draftutils\params.py", line 31, in <module>
    import Arch_rc
  File "D:\FreeCAD_1.0.0RC1-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)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pixelwaster commented 3 weeks ago

Back again with a related issue with the same results in 1.1.0 Dev Updated the Sheetmetal and Better Tool Library workbenches.

Report window

14:18:28  During initialization the error "[WinError 183] Cannot create a file when that file already exists: 'D:\\FreeCAD-38923\\Mod\\BIM' -> 'D:\\FreeCAD-38923\\Mod\\BIM021'" occurred in D:\FreeCAD-38923\Mod\Tux\InitGui.py
14:18:28  Please look into the log file for further information
---remainder cut

I have an empty folder called BIM021 that I have been using since 1.0rc2 to keep FreeCAD happy. 1.1dev is not happy any more and just spits out the above [WinError 183] after every start up.

current Version

OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38923 (Git)
Build type: Release
Branch: main
Hash: d20cb9e6ee198beb2bfd7e72d3dec0a575e3f28c
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Light.qss/FreeCAD Light/Fusion
Installed mods: 
  * AddonManager
  * Assembly
  * BIM 2021.12.0
  * BIM021
  * btl 0.9.9
  * CAM
  * CurvedShapes 1.0.12
  * Curves 0.6.50
  * Draft
  * FeedsAndSpeeds 0.5.0
  * Fem
  * Help 1.0.3
  * Idf
  * Import
  * Inspection
  * InventorLoader 1.4.0
  * lattice2 1.0.0
  * Manipulator 1.5.7
  * Material
  * Measure
  * Mesh
  * MeshPart
  * MeshRemodel 1.10.31
  * OpenSCAD
  * Part
  * PartDesign
  * Plot 2022.4.17
  * Points
  * ReverseEngineering
  * Robot
  * sheetmetal 0.4.26
  * Show
  * Sketcher
  * Spreadsheet
  * Start
  * Surface
  * TechDraw
  * Test
  * Tux
  * Web

Log file- FreeCAD.log

luzpaz commented 3 weeks ago

cc @yorikvanhavre https://github.com/FreeCAD/FreeCAD/issues/16683#issuecomment-2364278539