martinblech / xmltodict

Python module that makes working with XML feel like you are working with JSON
MIT License
5.52k stars 462 forks source link

defusedexpat can't compile, defusedexpat 'pyexpat.c': No such file or directory #325

Closed ferventgeek closed 1 year ago

ferventgeek commented 1 year ago

Great library on my laptop, less so to deploy. I'm trying to build a package for AWS Lambda, but it appears there are missing binaries which can't build. Specifically, pyexpat.c': No such file or directory of a file it expects Python to have installed, but is missing. pyexpat is available for import however. Is this a Python3 incompatibility?

xmltodict.py is throwing "could not be resolved" for defusedexpat, cStringIO. StringIO and "not defined" for basestring and unicode. That's making me think this is a Python2 only library. Attempting to install defusedexpat results in the compilation error above.

I'm sure I'm missing an obvious step. {Win10, Python 3.10.11, VSCode}

ferventgeek commented 1 year ago

Doh. New to Python, I didn't realize it's try/catch -ing to sort this out Python 2 VS 3. Linters indicate load errors but that's not an error for the code. Thx!