FreeCAD-Bundle icon indicating copy to clipboard operation
FreeCAD-Bundle copied to clipboard

Windows build missing lxml python library

Open KeithSloan opened this issue 4 years ago • 12 comments

Sorry cannot check as I don't have Windows, but because of issues users are having with the GDML workbench it is obvious that it is no longer in the AppImage

Was in FreeCAD_0.19.19424 and FreeCAD_0.19.19409_x64_Conda_Py3QT5-WinVS2015.7z

Believe there are parts of FreeCAD that use, but cannot remember which so it will not just be the workbench affected.

KeithSloan avatar Apr 20 '21 17:04 KeithSloan

We are working towards a dependency-solver included in the bundles. Maybe that is something interesting for you:

https://forum.freecadweb.org/viewtopic.php?f=42&t=58156

looooo avatar Apr 28 '21 10:04 looooo

@KeithSloan can GDML make lxml a dependency in the package.xml and hence import lxml via the Addon Manager?

luzpaz avatar Mar 25 '22 16:03 luzpaz

Don't understand what would go in package.xml. The metadata.txt already has

      workbenches=Part,Mesh
     pylibs=lxml,gmsh

But I know on MacOS it does not install gmsh python library .

Also this would only fix for FC 0.20

KeithSloan avatar Mar 25 '22 17:03 KeithSloan

@KeithSloan have you tested GDML install via the Addon Manager in v0.20dev? Does the addon manager pick those 2 deps up?

But I know on MacOS it does not install gmsh python library

For v0.20dev?

Also this would only fix for FC 0.20

Yea that's a good point.

luzpaz avatar Mar 25 '22 18:03 luzpaz

Just tried with latest weekly of FreeCAD 0.20 i.e.27936 and using addon manager to uninstall, restart, install, restart Does not install python gmsh library on Mac OS

KeithSloan avatar Mar 26 '22 16:03 KeithSloan

@KeithSloan we're on r28442 so it's not accurate enough of a test. Can you update ?

luzpaz avatar Mar 26 '22 21:03 luzpaz

27936 is the latest MacOS version in weekly builds

KeithSloan avatar Mar 26 '22 21:03 KeithSloan

Yea, it's waaay behind due to a conda build issue :disappointed:

luzpaz avatar Mar 26 '22 21:03 luzpaz

Also see https://forum.freecadweb.org/viewtopic.php?f=3&t=67040&p=583387#p583387

Edit: @keithsloan: link was incorrect. Now pointing to the right thread. I though you got the hint from my reply below. Fixed now.

KeithSloan avatar Mar 26 '22 21:03 KeithSloan

hah, that link was deceiving. try clicking it :laughing:

luzpaz avatar Mar 26 '22 21:03 luzpaz

Well this issue has probably put a CERN researcher off using FreeCAD and the GDML workbench, thanks guys :-(

Message received

On Windows, when I try the export in GDML, the following error happens:
 
14:27:26 running with xml.etree.ElementTree
14:27:26 Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Users\paolo\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1971, in export
exportGDMLworld(first, filepath, fileExt)
File "C:\Users\paolo\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1773, in exportGDMLworld
exportGDML(first, filepath, fileExt)
File "C:\Users\paolo\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1745, in exportGDML
exportGDMLstructure(dirPath, fileName)
File "C:\Users\paolo\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1686, in exportGDMLstructure
exportElementAsXML(dirPath, fileName, False, 'define', define)
File "C:\Users\paolo\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1677, in exportElementAsXML
gdml.append(ET.Entity(elemName))

<class 'AttributeError'>: module 'xml.etree.ElementTree' has no attribute 'Entity'
Hoping can be useful.

My Reply

"The GDML workbench is developed using the python lxml library it should only fall back to xml if lxml is not available.

FreeCAD also uses lxml and should/was being built with lxml installed, where did you get your install image for FreeCAD from?"

I got the image from the FreeCAD website https://www.freecadweb.org/downloads.php

"Your FreeCAD information would be useful FreeCAD | About FreeCAD | Copy to clipboard."

OS: Windows 10 Version 2009 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.24267 +148 (Git) Build type: Release Branch: Branch_0.19.4 Hash: 476ecf091941bead59b14e44afa6064d5a66afa3 Python version: 3.8.6+ Qt version: 5.15.2 Coin version: 4.0.1 OCC version: 7.5.3 Locale: Italian/Italy (it_IT)

"If you go to the Python Window and enter 'import lxml' I assume you get an error message."

Yes exactly.

KeithSloan avatar Apr 07 '22 11:04 KeithSloan

macos weekly build has been updated btw

luzpaz avatar Apr 07 '22 15:04 luzpaz