Author |
Topic |
|
lucasmr
Brazil
2 Posts |
Posted - Mar 24 2022 : 19:20:09
|
Hi!
When I open a previously saved project there is a python import error and FreeCad won't recognized all previously defined FHSegments.
There is a huge traceback; I will post only what seems the relevant part:
File "..\AppData\Roaming\FreeCAD\Mod\EM\EM_FHSegment.py", line 40, in <module> from EM_Globals import makeSegShape <class 'ImportError'>: cannot import name 'makeSegShape' from partially initialized module 'EM_Globals' (most likely due to a circular import) (..\AppData\Roaming\FreeCAD\Mod\EM\EM_Globals.py)
Does anyone have any idea how to fix that?
|
|
Enrico
542 Posts |
Posted - Mar 25 2022 : 16:40:50
|
Any chance to share the offending file? In case you can send it to me at my email address you can find in the 'contacts' page.
Thank you Enrico
|
|
|
lucasmr
Brazil
2 Posts |
Posted - Mar 25 2022 : 21:36:21
|
I am not able to send you an e-mail. There is this error
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'rs'
/forum/pop_mail.asp, line 228
I did read better the traceback and I noticed it was not that big. Actually, it was just repeating itself numerous times. Here it is in its entirety.
============================================================================================================== 17:04:53 Traceback (most recent call last):
File "C:\FreeCAD 0.19\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs)
File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_FHNode.py", line 38, in <module> from EM_Globals import EMFHNODE_DEF_NODECOLOR
File "C:\FreeCAD 0.19\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs)
File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_Globals.py", line 45, in <module> import EM
File "C:\FreeCAD 0.19\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs)
File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM.py", line 58, in <module> from EM_FHSegment import *
File "C:\FreeCAD 0.19\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs)
File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_FHSegment.py", line 40, in <module> from EM_Globals import makeSegShape
<class 'ImportError'>: cannot import name 'makeSegShape' from partially initialized module 'EM_Globals' (most likely due to a circular import) (C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_Globals.py)
==============================================================================================================
Nevertheless, after removing every "from EM_Globals import ..." from every file "EM_" listed at the traceback, the errors stopped. Still, not it is ideal because now it is not able to export to an inp file.
============================================================================================================== 17:31:54 Running the Python command 'EM_FHInputFile' failed: Traceback (most recent call last): File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_FHInputFile.py", line 187, in Activated FreeCADGui.doCommand('obj=EM.createFHInputFile(App.ActiveDocument)') File "<string>", line 1, in <module> File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_FHInputFile.py", line 150, in createFHInputFile plane.Proxy.serialize(fid) File "C:\Users\lucam\AppData\Roaming\FreeCAD\Mod\EM\EM_FHPlane.py", line 535, in serialize node.Proxy.serialize(fid, EMFHNODE_DEF_NODENAMEEXT)
'NoneType' object has no attribute 'serialize' ==============================================================================================================
Removing the imports was a mistake, probably. |
|
|
Enrico
542 Posts |
Posted - Mar 29 2022 : 18:20:35
|
You can contact me at
s u pp o rt <at> fastfieldsolvers <dot> com
(remove the spaces and replace symbols accordingly)
Best Regards, Enrico
|
|
|
|
Topic |
|
|
|