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

PyO3 error #1176

Closed
LukasJerabek opened this issue Oct 13, 2023 · 5 comments
Closed

PyO3 error #1176

LukasJerabek opened this issue Oct 13, 2023 · 5 comments
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup

Comments

@LukasJerabek
Copy link

I had to downgrade back to 4.17.3 version because in newer versions I got these errors when running tests with pytest. Is PyO3 some sub dependency?

   BROKEN  .tests.integ.iadmin.modules.test_validators
ImportError while importing test module '/home/vagrant/pack/tests/integ/iadmin/modules/test_validators.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../.pyenv/versions/3.8.18/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/integ/iadmin/modules/test_validators.py:2: in <module>
    from jsonschema import ValidationError
../venv/pack/lib/python3.8/site-packages/jsonschema/__init__.py:13: in <module>
    from jsonschema._format import FormatChecker
../venv/pack/lib/python3.8/site-packages/jsonschema/_format.py:11: in <module>
    from jsonschema.exceptions import FormatError
../venv/pack/lib/python3.8/site-packages/jsonschema/exceptions.py:15: in <module>
    from referencing.exceptions import Unresolvable as _Unresolvable
../venv/pack/lib/python3.8/site-packages/referencing/__init__.py:4: in <module>
    from referencing._core import Anchor, Registry, Resource, Specification
../venv/pack/lib/python3.8/site-packages/referencing/_core.py:8: in <module>
    from rpds import HashTrieMap, HashTrieSet, List
../venv/pack/lib/python3.8/site-packages/rpds/__init__.py:1: in <module>
    from .rpds import *
E   ImportError: PyO3 modules may only be initialized once per interpreter process
@Julian
Copy link
Member

Julian commented Oct 13, 2023

Yes, it's used by rpds. Please provide something which reproduces the behavior you're seeing.

@Julian
Copy link
Member

Julian commented Oct 14, 2023

Closing but happy to look into this if you can share something which reproduces.

@Julian Julian closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2023
@LukasJerabek
Copy link
Author

LukasJerabek commented Oct 14, 2023

I am still investigating this little bit deeper, because it seems to be caused by how our tests are run, couldnt reproduce it outside our tests run script yet.

@LukasJerabek
Copy link
Author

LukasJerabek commented Oct 16, 2023

My suspicion has turned to python-cov package now. In case you are interested, since I am still not sure, which package exactly causes it (python-cov or both jsonschema and cryptography), you can check out the reproducer here pytest-dev/pytest-cov#614

@Julian
Copy link
Member

Julian commented Oct 16, 2023

Thanks, will perhaps have a look there.

@Julian Julian added the Invalid Not a bug, PEBKAC, or an unsupported setup label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Not a bug, PEBKAC, or an unsupported setup
Projects
None yet
Development

No branches or pull requests

2 participants