Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Import module does not load when Gui absent #8

Open
wdconinc opened this issue Mar 4, 2019 · 4 comments
Open

Import module does not load when Gui absent #8

wdconinc opened this issue Mar 4, 2019 · 4 comments

Comments

@wdconinc
Copy link

wdconinc commented Mar 4, 2019

Prevents testing inside freecadcmd-daily, e.g.

import importGDML
importGDML.open("tests/import/entity1.gdml")
@KeithSloan
Copy link
Owner

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?

@wdconinc
Copy link
Author

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.

@KeithSloan
Copy link
Owner

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.

@KeithSloan
Copy link
Owner

Have now fixed I believe please can you retry and report back. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants