Import module does not load when Gui absent
Prevents testing inside freecadcmd-daily, e.g.
import importGDML
importGDML.open("tests/import/entity1.gdml")
Using workbench branch if I type similar commands in the python console in either freecad or freecad-daily it works for me. Are you trying to run from python without starting FreeCAD?
I was using freecadcmd-daily:
17:25:30 wdconinc@herakles ~/git/FreeCAD_Python_GDML (workbench %=) $ freecadcmd-daily
FreeCAD 0.18, Libs: 0.18R16085 (Git)
(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> import importGDML
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/freecad-daily/Mod/GDML/importGDML.py", line 34, in <module>
import Part, PartGui
ImportError: Cannot load Gui module in console application.
It's just faster to try the import/export tests when not having to restart the gui.
Not sure what the problem is Works fine on freecad and freecad-daily for me.
My freecad-daily is OS: Ubuntu 18.04.2 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.16093 (Git) Build type: Release Branch: releases/FreeCAD-0-18 Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce Python version: 2.7.15rc1 Qt version: 5.9.5 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedKingdom (en_GB)
My version has some updates since the version on github so maybe has been fixed. Will not close at this stage.
Have now fixed I believe please can you retry and report back. Thanks