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

Python 3.13 with no gil - SystemError: init function of orjson returned uninitialized object #520

Closed
prabhu opened this issue Oct 8, 2024 · 2 comments
Labels
invalid This doesn't seem right

Comments

@prabhu
Copy link

prabhu commented Oct 8, 2024

I am getting this error, while testing my project with python 3.13 with free-threading. Used the below code snippet to setup this in GitHub actions.

- name: Set up Python
       uses: deadsnakes/action@v3.2.0
       with:
         python-version: '3.13'
         nogil: true

Example failure:
https://github.com/AppThreat/vulnerability-db/actions/runs/11240903455/job/31251265074#step:9:152

@jpmckinney
Copy link

Copy the actual failure here? That link doesn’t show any details under my account.

@prabhu
Copy link
Author

prabhu commented Oct 16, 2024

test/test_npm.py:6: in <module>
    from vdb.lib.npm import NpmSource
        __builtins__ = <builtins>
        __cached__ = '/home/runner/work/vulnerability-db/vulnerability-db/test/__pycache__/test_npm.cpython-313.pyc'
        __doc__    = None
        __file__   = '/home/runner/work/vulnerability-db/vulnerability-db/test/test_npm.py'
        __loader__ = <_pytest.assertion.rewrite.AssertionRewritingHook object at 0x47db8508710>
        __name__   = 'test.test_npm'
        __package__ = 'test'
        __spec__   = ModuleSpec(name='test.test_npm', loader=<_pytest.assertion.rewrite.AssertionRewritingHook object at 0x47db8508710>, origin='/home/runner/work/vulnerability-db/vulnerability-db/test/test_npm.py')
        json       = <module 'json' from '/usr/lib/python3.13/json/__init__.py'>
        os         = <module 'os' (frozen)>
        pytest     = <module 'pytest' from '/home/runner/venv-3.13/lib/python3.13t/site-packages/pytest/__init__.py'>
vdb/lib/__init__.py:8: in <module>
    import orjson
        ABCMeta    = <class 'abc.ABCMeta'>
        Enum       = <enum 'Enum'>
        __builtins__ = <builtins>
        __cached__ = '/home/runner/work/vulnerability-db/vulnerability-db/vdb/lib/__pycache__/__init__.cpython-313.pyc'
        __doc__    = None
        __file__   = '/home/runner/work/vulnerability-db/vulnerability-db/vdb/lib/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x47db88478d0>
        __name__   = 'vdb.lib'
        __package__ = 'vdb.lib'
        __path__   = ['/home/runner/work/vulnerability-db/vulnerability-db/vdb/lib']
        __spec__   = ModuleSpec(name='vdb.lib', loader=<_frozen_importlib_external.SourceFileLoader object at 0x47db88478d0>, origin='/home...ty-db/vdb/lib/__init__.py', submodule_search_locations=['/home/runner/work/vulnerability-db/vulnerability-db/vdb/lib'])
        abstractmethod = <function abstractmethod at 0x47db84[27](https://github.com/AppThreat/vulnerability-db/actions/runs/11240903455/job/31633478305#step:9:28)a80>
        datetime   = <class 'datetime.datetime'>
        os         = <module 'os' (frozen)>
        re         = <module 're' from '/usr/lib/python3.13/re/__init__.py'>
        tempfile   = <module 'tempfile' from '/usr/lib/python3.13/tempfile.py'>
../../../venv-3.13/lib/python3.13t/site-packages/orjson/__init__.py:3: in <module>
    from .orjson import *
E   SystemError: init function of orjson returned uninitialized object
        __builtins__ = <builtins>
        __cached__ = '/home/runner/venv-3.13/lib/python3.13t/site-packages/orjson/__pycache__/__init__.cpython-[31](https://github.com/AppThreat/vulnerability-db/actions/runs/11240903455/job/31633478305#step:9:32)3.pyc'
        __doc__    = None
        __file__   = '/home/runner/venv-3.13/lib/python3.13t/site-packages/orjson/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x47db8847870>
        __name__   = 'orjson'
        __package__ = 'orjson'
        __path__   = ['/home/runner/venv-3.13/lib/python3.13t/site-packages/orjson']
        __spec__   = ModuleSpec(name='orjson', loader=<_frozen_importlib_external.SourceFileLoader object at 0x47db8847870>, origin='/home/...ckages/orjson/__init__.py', submodule_search_locations=['/home/runner/venv-3.13/lib/python3.13t/site-packages/orjson'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants