jfhbrook / pyee

A rough port of Node.js's EventEmitter to Python with a few tricks of its own
https://github.com/jfhbrook/public
MIT License
371 stars 39 forks source link

OSX Issue module 'select' has no attribute 'epoll' #93

Closed bkovacev closed 2 years ago

bkovacev commented 2 years ago
app_1            | Traceback (most recent call last):
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
app_1            |     worker.init_process()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/ggevent.py", line 146, in init_process
app_1            |     super().init_process()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
app_1            |     self.load_wsgi()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
app_1            |     self.wsgi = self.app.wsgi()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
app_1            |     self.callable = self.load()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
app_1            |     return self.load_wsgiapp()
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
app_1            |     return util.import_app(self.app_uri)
app_1            |   File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
app_1            |     mod = importlib.import_module(module)
app_1            |   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
app_1            |     return _bootstrap._gcd_import(name[level:], package, level)
app_1            |   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
app_1            |   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
app_1            |   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
app_1            |   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
app_1            |   File "<frozen importlib._bootstrap_external>", line 790, in exec_module
app_1            |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
app_1            |   File "/usr/src/app/ruckit/wsgi.py", line 17, in <module>
app_1            |     application = Cling(get_wsgi_application())
app_1            |   File "/usr/local/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
app_1            |     django.setup(set_prefix=False)
app_1            |   File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
app_1            |     apps.populate(settings.INSTALLED_APPS)
app_1            |   File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 114, in populate
app_1            |     app_config.import_models()
app_1            |   File "/usr/local/lib/python3.9/site-packages/django/apps/config.py", line 211, in import_models
app_1            |     self.models_module = import_module(models_module_name)
app_1            |   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
app_1            |     return _bootstrap._gcd_import(name[level:], package, level)
app_1            |   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
app_1            |   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
app_1            |   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
app_1            |   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
app_1            |   File "<frozen importlib._bootstrap_external>", line 790, in exec_module
app_1            |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
app_1            |   File "/usr/src/app/ruckit/billing/models.py", line 26, in <module>
app_1            |     from ruckit import email as ruckit_email, pdf as ruckit_pdf
app_1            |   File "/usr/src/app/ruckit/pdf.py", line 3, in <module>
app_1            |     from pyppeteer import launch, errors
app_1            |   File "/usr/local/lib/python3.9/site-packages/pyppeteer/__init__.py", line 30, in <module>
app_1            |     from pyppeteer.launcher import connect, launch, executablePath  # noqa: E402
app_1            |   File "/usr/local/lib/python3.9/site-packages/pyppeteer/launcher.py", line 25, in <module>
app_1            |     from pyppeteer.browser import Browser
app_1            |   File "/usr/local/lib/python3.9/site-packages/pyppeteer/browser.py", line 11, in <module>
app_1            |     from pyee import EventEmitter
app_1            |   File "/usr/local/lib/python3.9/site-packages/pyee/__init__.py", line 59, in <module>
app_1            |     from pyee._trio import TrioEventEmitter  # noqa
app_1            |   File "/usr/local/lib/python3.9/site-packages/pyee/_trio.py", line 4, in <module>
app_1            |     import trio
app_1            |   File "/usr/local/lib/python3.9/site-packages/trio/__init__.py", line 18, in <module>
app_1            |     from ._core import (
app_1            |   File "/usr/local/lib/python3.9/site-packages/trio/_core/__init__.py", line 29, in <module>
app_1            |     from ._run import (
app_1            |   File "/usr/local/lib/python3.9/site-packages/trio/_core/_run.py", line 2370, in <module>
app_1            |     from ._io_epoll import EpollIOManager as TheIOManager
app_1            |   File "/usr/local/lib/python3.9/site-packages/trio/_core/_io_epoll.py", line 188, in <module>
app_1            |     class EpollIOManager:
app_1            |   File "/usr/local/lib/python3.9/site-packages/trio/_core/_io_epoll.py", line 189, in EpollIOManager
app_1            |     _epoll = attr.ib(factory=select.epoll)
app_1            | AttributeError: module 'select' has no attribute 'epoll'

This has worked previously but has suddenly stopped working.

I tried updating to the latest versions however, no luck.

pyppeteer==0.2.6
pyee==8.1.0
jfhbrook commented 2 years ago

Hi, I can't help you with debugging trio. If you can reproduce this with a minimal case I can clone and try locally but this really really looks like an issue with trio, not pyee. Closing, but again, if you think I'm wrong I'm listening.