PyInotify icon indicating copy to clipboard operation
PyInotify copied to clipboard

AttributeError: module 'select' has no attribute 'epoll'

Open wojtek-fliposports opened this issue 7 years ago • 8 comments

  File "/usr/local/lib/python3.6/site-packages/inotify/adapters.py", line 44, in __init__
    self.__epoll = select.epoll()
AttributeError: module 'select' has no attribute 'epoll'

and select from:

<module 'select' from '/tmp/tmp36/lib/python3.6/lib-dynload/select.cpython-36m-darwin.so'>

wojtek-fliposports avatar Dec 06 '17 14:12 wojtek-fliposports

it.s under OSX.. sorry.. close or maybe add wrong platform exception

wojtek-fliposports avatar Dec 06 '17 14:12 wojtek-fliposports

Interesting. Our unit-tests stop at 3.5 so we missed this. Can you investigate?

dsoprea avatar Dec 06 '17 14:12 dsoprea

I was trying to run gunicorn under docker linux image on Darwin platform (OSX), gunicorn with --reload feature

wojtek-fliposports avatar Dec 06 '17 14:12 wojtek-fliposports

"epoll" is linux only. I have a patch to use "selectors" module when using Python >=3.4. This way this library run under SmartOS (a Solaris derivative).

filesystem notifications are highly unportable. MacOS X will surely provide a similar interface but the details are most probably different. In my case, SmartOS provides a linux inotify compatibility layer beside their native filesystem notification, so I can use this library with a half a dozen of line changes.

@dsoprea , are you interested in my patches?. Currently they only work on Python >=3.4, but I could do a Python 2 compatible version.

jcea avatar Jan 12 '18 01:01 jcea

Excuse me,

I used this library on Linux & python3.5, but same error was occurred... Are there other required packages? And, are there any samples about epoll?

rkmrHonjo avatar Feb 05 '18 11:02 rkmrHonjo

Really sorry, my above comment was caused by my code... Please ignore it.

rkmrHonjo avatar Feb 13 '18 09:02 rkmrHonjo

Patches are welcome.

dsoprea avatar Aug 25 '20 17:08 dsoprea

@jcea Could you share your patch?

huzunhao avatar Apr 01 '21 06:04 huzunhao