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

import error with python-3.8.1 involving pyinotify.cpython-38.pyc #185

Open
agouaux opened this issue Mar 21, 2020 · 0 comments
Open

import error with python-3.8.1 involving pyinotify.cpython-38.pyc #185

agouaux opened this issue Mar 21, 2020 · 0 comments

Comments

@agouaux
Copy link

agouaux commented Mar 21, 2020

After installing this module into python-3.8.1, when I try to import it, I get the following error:

$ python -m pyinotify -v /tmp
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 184, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.8/runpy.py", line 154, in _get_module_details
    code = loader.get_code(mod_name)
  File "<frozen importlib._bootstrap_external>", line 911, in get_code
  File "<frozen importlib._bootstrap_external>", line 580, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

$ python --version
Python 3.8.1

However, after I delete the following file, it works.

# rm -f /usr/local/lib/python3.8/site-packages/__pycache__/pyinotify.cpython-38.pyc

$ python -m pyinotify -v /tmp
[2020-03-21 13:14:56,596 pyinotify DEBUG] Start monitoring ['/tmp'], (press c^c to halt pyinotify)
[2020-03-21 13:14:56,606 pyinotify DEBUG] New <Watch wd=1 path=/tmp mask=4095 proc_fun=None auto_add=None exclude_filter=<function WatchManager.<lambda> at 0x7f65bfb373a0> dir=True >
^C[2020-03-21 13:15:01,222 pyinotify DEBUG] Pyinotify stops monitoring.
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

1 participant