Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`import inotify.adapters` does not work on M1 Mac

Aperta
#2,145 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
macos, python

Direzione di ricerca

Inizia da src/tests/integration/test_prove.py e riproduci l’errore di importazione usando i comandi poetry e make test-integration indicati su un Mac M1. Il lavoro è completato quando l’importazione di inotify non impedisce più la raccolta dei test di integrazione su quella piattaforma e i test interessati possono essere eseguiti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

There is a problem with the newly introduced inotify dependency. In particular, when I try to run the integrataion tests of KEVM locally on my M1 Mac, I get the following error:

petarmax@PetarMax kevm-pyk % make test-integration PYTEST_ARGS='-k test_prove.py --update-expected-output'
poetry install
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: kevm-pyk (1.0.329)
poetry run pytest src/tests/integration --verbose --durations=0 --dist=worksteal --maxfail=1 --numprocesses=8 -k test_prove.py --update-expected-output
====================================================================================== test session starts ======================================================================================
platform darwin -- Python 3.10.13, pytest-7.4.2, pluggy-1.3.0 -- /Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/bin/python
cachedir: .pytest_cache
rootdir: /Users/petarmax/Projects/RV/kevm/worktree/lemmas/kevm-pyk
plugins: pyk-0.1.478, timeout-2.2.0, cov-4.1.0, mock-3.12.0, xdist-3.3.1
collecting 0 items / 1 error                                                                                                                                                                    
============================================================================================ ERRORS =============================================================================================
_____________________________________________________________________ ERROR collecting src/tests/integration/test_prove.py ______________________________________________________________________
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:688: in _load_unlocked
    ???
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
src/tests/integration/test_prove.py:10: in <module>
    import inotify.adapters  # type: ignore
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/adapters.py:11: in <module>
    import inotify.calls
/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/calls.py:39: in <module>
    inotify_init = _LIB.inotify_init
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py:387: in __getattr__
    func = self.__getitem__(name)
/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py:392: in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
E   AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found
==================================================================================== short test summary info ====================================================================================
ERROR src/tests/integration/test_prove.py - AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found

which can be isolated to

petarmax@dyn3230-161 kevm-pyk % poetry run python                                                                              
^[[APython 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import inotify.adapters
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/adapters.py", line 11, in <module>
    import inotify.calls
  File "/Users/petarmax/Library/Caches/pypoetry/virtualenvs/kevm-pyk-kQJ01N3y-py3.10/lib/python3.10/site-packages/inotify/calls.py", line 39, in <module>
    inotify_init = _LIB.inotify_init
  File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x3a9c6d5d8, inotify_init): symbol not found
Lingua principale
KCL
Stelle
592
Fork
156
Merge medio
2h 19m
PR unite (30g)
1

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di runtimeverification/evm-semantics

Tutte le issue di runtimeverification/evm-semantics

Issue simili

Altre issue su Operating Systems

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.