← 输入框|github.com|刷新
Skip to content

error using Queu in multiprocessing #5361

Closed

Description

@0Wall-E

Summary

erfan@erfan-Inspiron-N4050:~/RustroverProjects/RustPython/target/release2$ ./rustpython Portals2.py
/home/erfan/.local/lib/rustpython3.12/site-packages/requests/__init__.py:89: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
  RequestsDependencyWarning,
888
Traceback (most recent call last):
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/synchronize.py", line 28, in <module>
    from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Portals2.py", line 285, in <module>
    b = a.OpenPortals(a)
  File "Portals2.py", line 200, in __init__
    self.portals["portal1"] = {"pct":Queue(), "cnt":Queue(), "rng":(0, int(self2.cl/8))}
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/context.py", line 103, in Queue
    return Queue(maxsize, ctx=self.get_context())
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/queues.py", line 40, in __init__
    from .synchronize import SEM_VALUE_MAX as maxsize
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/synchronize.py", line 33, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
erfan@erfan-Inspiron-N4050:~/RustroverProjects/RustPython/target/release2$ ./rustpython Portals2.py
/home/erfan/.local/lib/rustpython3.12/site-packages/requests/__init__.py:89: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
  RequestsDependencyWarning,
888
Traceback (most recent call last):
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/synchronize.py", line 28, in <module>
    from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Portals2.py", line 285, in <module>
    b = a.OpenPortals(a)
  File "Portals2.py", line 200, in __init__
    self.portals["portal1"] = {"pct":Queue(), "cnt":Queue(), "rng":(0, int(self2.cl/8))}
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/context.py", line 103, in Queue
    return Queue(maxsize, ctx=self.get_context())
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/queues.py", line 40, in __init__
    from .synchronize import SEM_VALUE_MAX as maxsize
  File "/home/erfan/RustroverProjects/RustPython/pylib/Lib/multiprocessing/synchronize.py", line 33, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

Activity

  1. oskar-skog commented on Jul 20, 2026

    @oskar-skog
    Contributor

    This is working now, probably fixed by #6542

  2. youknowone commented on Oct 6, 2026

    @youknowone
    Member

    multiprocessing.Queue put/get works on current main. Closing; this matches the earlier report that #6542 resolved the SemLock import failure.

    — commented by Grok 4.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions