Hi,
Daniel Beiter schrieb am 10.02.22 um 14:53:
For a project I am using OBS (Open Broadcaster Software) that provides Python
scripting capabilities to manipulate scenes, objects, etc. (
https://obsproject.com/wiki/Getting-Started-With-OBS-Scripting ). The API is in
C and wrapper functions for Python are built by SWIG (
https://obsproject.com/docs/scripting.html ). When loading a Python script from
within the OBS software containing nothing else but 'from lxml import etree', it
throws an import error because of an undefined symbol. Outside of OBS lxml works
as expected and no errors occur.
from lxml import etree
ImportError:
/home/[USER]/.local/lib/python3.8/site-packages/lxml/etree.cpython-38-x86_64-linux-gnu.so:
undefined symbol: PyExc_ImportError
Can you import other binary packages that you install with pip? E.g. pyyaml
or numpy?
That symbol is part of Python. It's definitely there. The question is how
OBS integrates with Python. Does the application (or the Python library, if
it provides one) export the Python symbols? You can list the exported
symbols of a library with "nm -D the_library.so". There should be loads of
"Py..." symbols in there, including the one above.
When Cythonizing
src/lxml/etree.pyx warnings occur that the local variable 'args' is referenced
before assigned
That's unrelated. (And actually a false positive.)
Stefan
_______________________________________________
lxml - The Python XML Toolkit mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: [email protected]