[solved] issue with loading external workbenches/modules

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

[solved] issue with loading external workbenches/modules

Post by looo »

I encounter an issue with loading external workbenches. This regression has impact on both types of modules (InitGui, init_gui). I see some changes in sys.path. Seems like we are changing the mod / macro directory to something like "~/.local"

This is the output of sys.path:

Code: Select all

['/home/lo/.local/share/FreeCAD/Mod/Assembly4'
'/home/lo/.local/share/FreeCAD/Mod/Manipulator'
'/home/lo/miniconda3/envs/freecad/Mod/Start'
'/home/lo/miniconda3/envs/freecad/Mod/OpenSCAD'
'/home/lo/miniconda3/envs/freecad/Mod/AddonManager'
'/home/lo/miniconda3/envs/freecad/Mod/Raytracing'
'/home/lo/miniconda3/envs/freecad/Mod/Test'
'/home/lo/miniconda3/envs/freecad/Mod/PartDesign'
'/home/lo/miniconda3/envs/freecad/Mod/Surface'
'/home/lo/miniconda3/envs/freecad/Mod/Robot'
'/home/lo/miniconda3/envs/freecad/Mod/Web'
'/home/lo/miniconda3/envs/freecad/Mod/Path'
'/home/lo/miniconda3/envs/freecad/Mod/Spreadsheet'
'/home/lo/miniconda3/envs/freecad/Mod/Mesh'
'/home/lo/miniconda3/envs/freecad/Mod/Fem'
'/home/lo/miniconda3/envs/freecad/Mod/Material'
'/home/lo/miniconda3/envs/freecad/Mod/Draft'
'/home/lo/miniconda3/envs/freecad/Mod/Inspection'
'/home/lo/miniconda3/envs/freecad/Mod/Drawing'
'/home/lo/miniconda3/envs/freecad/Mod/Arch'
'/home/lo/miniconda3/envs/freecad/Mod/MeshPart'
'/home/lo/miniconda3/envs/freecad/Mod/Points'
'/home/lo/miniconda3/envs/freecad/Mod/Tux'
'/home/lo/miniconda3/envs/freecad/Mod/Sketcher'
'/home/lo/miniconda3/envs/freecad/Mod/Measure'
'/home/lo/miniconda3/envs/freecad/Mod/Import'
'/home/lo/miniconda3/envs/freecad/Mod/TechDraw'
'/home/lo/miniconda3/envs/freecad/Mod/Image'
'/home/lo/miniconda3/envs/freecad/Mod/Part'
'/home/lo/miniconda3/envs/freecad/Mod/Show'
'/home/lo/miniconda3/envs/freecad/Mod/ReverseEngineering'
'/home/lo/miniconda3/envs/freecad/Mod/Idf'
'/home/lo/miniconda3/envs/freecad/Mod'
'/home/lo/miniconda3/envs/freecad/lib'
'/home/lo/miniconda3/envs/freecad/Ext'
''
'/home/lo/miniconda3/envs/freecad/lib/python39.zip'
'/home/lo/miniconda3/envs/freecad/lib/python3.9'
'/home/lo/miniconda3/envs/freecad/lib/python3.9/lib-dynload'
'/home/lo/miniconda3/envs/freecad/lib/python3.9/site-packages'
'/home/lo/projects/freecad/freecad.gears'
'/home/lo/projects/openglider/OpenGlider'
'/home/lo/.FreeCAD/Macro'
'/home/lo/miniconda3/envs/freecad/Macro']
Actually, the Mod directory was removed. Are there any proposals on how this will look like in the future?

Code: Select all

OS: Ubuntu 18.04.6 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.26554 (Git)
Build type: Release
Branch: (HEAD detached at 817c14b)
Hash: 817c14b16af681b06aec7d8c79f744c7a88fa3c3
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)

As many rely on external workbenches, I hope we can fix this as soon as possible.
Last edited by looo on Wed Dec 08, 2021 11:57 am, edited 1 time in total.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [0.20.26554] issue with loading external workbenches/modules

Post by looo »

ok looks like we changeing the directories. But I do not get this warning:

https://github.com/FreeCAD/FreeCAD/comm ... 7adba7d055

Anyway, we definetly should deprecate the ~.FreeCAD directory before we move this to a new directory.
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: [0.20.26554] issue with loading external workbenches/modules

Post by Chris_G »

Hi,
For your information, here is the relative discussion :
https://forum.freecadweb.org/viewtopic.php?f=9&t=63648
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [0.20.26554] issue with loading external workbenches/modules

Post by looo »

thanks @Chris_G
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [0.20.26554] issue with loading external workbenches/modules

Post by looo »

I guess there was an issue with retrieving the workbench. I tried again and now the workbench was installed correctly in ~/local/share/FreeCAD. So I think this is working as expected and I was only confused by the switch to the new location.
Post Reply