dsoprea / PyInotify

An efficient and elegant inotify (Linux filesystem activity monitor) library for Python. Python 2 and 3 compatible.
GNU General Public License v2.0
242 stars 73 forks source link

symbol not found on Python 3.7.3 OSX 10.14.2 #73

Closed saritaegon closed 5 years ago

saritaegon commented 5 years ago
import inotify.adapters

def _main():
    i = inotify.adapters.Inotify()

    i.add_watch('/tmp')

    with open('/tmp/test_file', 'w'):
        pass

    events = i.event_gen(yield_nones=False, timeout_s=1)
    events = list(events)

    print(events)

if __name__ == '__main__':
    _main()
$ python file-watcher.py
Traceback (most recent call last):
  File "file-watcher.py", line 1, in <module>
    import inotify.adapters
  File "/Users/sarit/.pyenv/versions/life/lib/python3.7/site-packages/inotify/adapters.py", line 11, in <module>
    import inotify.calls
  File "/Users/sarit/.pyenv/versions/life/lib/python3.7/site-packages/inotify/calls.py", line 39, in <module>
    inotify_init = _LIB.inotify_init
  File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
    func = self.__getitem__(name)
  File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x11816fe90, inotify_init): symbol not found

OSX: 1014.2 Python: 3.7.3 inotify==0.2.10

Any idea?

dsoprea commented 5 years ago

Dump the symbols in libc.so.6 and check for _notifyinit. Sounds like a local problem.

parchanco commented 4 years ago

Same error for me, same python version check the issue.

kingname commented 4 years ago

same error for me. any solution?

elcolie commented 4 years ago

@kingname I changed to watchdog