KeithSloan / GDML

FreeCAD GDML Workbench - AddonManager Installable
Other
49 stars 16 forks source link

manual copy install problem #34

Closed shangjiaxuan closed 3 years ago

shangjiaxuan commented 3 years ago

The latest FreeCAD release (19_pre 23756) have the same problem as 18 that the addon manager is broken likely because of GitHub web code update (thus cannot retrieve a list of addons). I tried to manually move the files in freecad/gdml into the Mods folder, and renamed the __init__.py and init_gui.py to Init.py and InitGui.py (and also rename the freecad used in code to FreeCAD to match the definition of install). FreeCAD is able to locate and try to load the extension, but fails with error name 'joinDir' is not defined. I tried move the definition and such, but failed. How do I fix this problem?

shangjiaxuan commented 3 years ago

I replaced the init_gui.py with the InitGui.py from the older repository, and fixed a typo where there's a missing comma in exportGDML.py (and replaced lxml with xml.etree.ElementTree, since I was having problem with python resolving etree in lxml, and removed the hint in XMLParser). Now it works fine.

KeithSloan commented 3 years ago

Please could you let me know where the missing comma was in exportGDML.py

shangjiaxuan commented 3 years ago

Please could you let me know where the missing comma was in exportGDML.py

I'm sorry, I mistook the older un-maintained repo for this one. The comma problem was with that repo, along with other problems. I tried to workaround the addon-manager problem and the installed version worked smoothly.