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

ImportError: xmlsec.cpython-311-darwin.so #362

Open
tahayk opened this issue Jun 23, 2023 · 3 comments
Open

ImportError: xmlsec.cpython-311-darwin.so #362

tahayk opened this issue Jun 23, 2023 · 3 comments

Comments

@tahayk
Copy link

tahayk commented Jun 23, 2023

Hello everyone,

Unfortunately I'm getting the following error whenever I try to run a project on MacOS13 M1, with python 3.11:

from onelogin.saml2.auth import OneLogin_Saml2_Auth
  File "/Users/tahayk/asayer/openreplay/ee/api/.venv/lib/python3.11/site-packages/onelogin/saml2/auth.py", line 12, in <module>
    import xmlsec
ImportError: dlopen(/Users/tahayk/asayer/openreplay/ee/api/.venv/lib/python3.11/site-packages/xmlsec.cpython-311-darwin.so, 0x0002): Symbol not found: _xmlSecSoap11Ns
  Referenced from: <E4FE0C82-541F-383E-98A2-ADC1187ECE31> /Users/tahayk/asayer/openreplay/ee/api/.venv/lib/python3.11/site-packages/xmlsec.cpython-311-darwin.so
  Expected in:     <DEA5BDBE-E175-3D66-A874-552778111B41> /opt/homebrew/Cellar/libxmlsec1/1.3.1/lib/libxmlsec1.1.dylib

Any idea how to fix this issue ?
I'm not sure if I should publish this here or if it is related to other packages.

Thank you in advance.

@lllama
Copy link

lllama commented Jun 26, 2023

+1 on this - just started a new project and have the same error.

@tahayk
Copy link
Author

tahayk commented Jun 27, 2023

@lllama in the meantime, I found a temporary workaround to allow me to continue my project,
I'm using the following Docker file to test my project:

FROM python:3.11-alpine3.17
RUN apk add --no-cache build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec

WORKDIR /work
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY . .
CMD ./entrypoint.sh

@lllama
Copy link

lllama commented Jun 27, 2023

Cool - I'm assuming that ends up with a non-breaking version of xmlsec.

It looks like this is down to this issue: xmlsec/python-xmlsec#252
xmlsec had a new release that removed some functionality and the python-xmlsec lib hasn't been updated to support it.

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

2 participants