Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build missing lxml python library #62

Open
KeithSloan opened this issue Apr 20, 2021 · 12 comments
Open

Windows build missing lxml python library #62

KeithSloan opened this issue Apr 20, 2021 · 12 comments

Comments

@KeithSloan
Copy link

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.

@looooo
Copy link
Contributor

looooo commented Apr 28, 2021

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

@luzpaz
Copy link
Collaborator

luzpaz commented Mar 25, 2022

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

@KeithSloan
Copy link
Author

KeithSloan commented Mar 25, 2022

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

@luzpaz
Copy link
Collaborator

luzpaz commented Mar 25, 2022

@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.

@KeithSloan
Copy link
Author

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

@luzpaz
Copy link
Collaborator

luzpaz commented Mar 26, 2022

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

@KeithSloan
Copy link
Author

27936 is the latest MacOS version in weekly builds

@luzpaz
Copy link
Collaborator

luzpaz commented Mar 26, 2022

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

@KeithSloan
Copy link
Author

KeithSloan commented Mar 26, 2022

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.

@luzpaz
Copy link
Collaborator

luzpaz commented Mar 26, 2022

hah, that link was deceiving. try clicking it 😆

@KeithSloan
Copy link
Author

KeithSloan commented Apr 7, 2022

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.

@luzpaz
Copy link
Collaborator

luzpaz commented Apr 7, 2022

macos weekly build has been updated btw

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

No branches or pull requests

3 participants