stefankorisnik3 wrote: ↑Thu Aug 04, 2022 1:38 pm
I have main file and the other file that i'm including in the main file.
I have forgotten to
in the other file and get the error.
Now i fix it by adding this line in the other file but error still persist.
After restarting the FreeCAD application error is gone.
Do i need every time to restart the FreeCAD application when i need to import something in the other file?
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods:
* CurvedShapes 1.0.3
* Curves 0.5.2
Importing from "nested" source files, are subject to some caching mechanism, that could be on some excerpts circumvented using
importlib.reload in the main file, but this use has some drawbacks.
Sadly this could not be done everytime and not as example if you program a WB, the import mechanism is derived from Python and this is a:
- known problem
- with some partial solutions
- out of control of FC developers in many aspects.
I've not found a general solution for complex and nested sources the only reliable way is to restart FreeCAD, especially when you are having erratic results.
This will avoid a lot of headaches.
Regards
Carlo D.