Error while running the server example from the docs
See original GitHub issueI’m trying to run this example which is in the docs here
import eventlet
import socketio
sio = socketio.Server()
app = socketio.WSGIApp(sio, static_files={
'/': {'content_type': 'text/html', 'filename': 'index.html'}
})
@sio.event
def connect(sid, environ):
print('connect ', sid)
@sio.event
def my_message(sid, data):
print('message ', data)
@sio.event
def disconnect(sid):
print('disconnect ', sid)
if __name__ == '__main__':
eventlet.wsgi.server(eventlet.listen(('', 5000)), app)
But as soon as I execute it I get this error
(15262) wsgi starting up on http://0.0.0.0:5000
(15262) wsgi exited, is_accepting=True
Traceback (most recent call last):
File "the_path_in_my_pc/__init__.py", line 70, in <module>
eventlet.wsgi.server(eventlet.listen(('', 5000)), app)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/wsgi.py", line 990, in server
client_socket, client_addr = sock.accept()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/greenio/base.py", line 230, in accept
self._trampoline(fd, read=True, timeout=self.gettimeout(), timeout_exc=_timeout_exc)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/greenio/base.py", line 208, in _trampoline
return trampoline(fd, read=read, write=write, timeout=timeout,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/hubs/__init__.py", line 155, in trampoline
listener = hub.add(hub.READ, fileno, current.switch, current.throw, mark_as_closed)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/hubs/kqueue.py", line 53, in add
self._control([event], 0, 0)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eventlet/hubs/kqueue.py", line 39, in _control
return self.kqueue.control(events, max_events, timeout)
TypeError: changelist must be an iterable of select.kevent objects
What may be the cause?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Error handling - Apollo GraphQL Docs
Throwing errors For example, it throws a GRAPHQL_VALIDATION_FAILED error whenever an incoming operation isn't valid against the server's schema. Your resolvers ...
Read more >Troubleshoot Cloud Run issues
The following error occurs when you try to deploy or try to call another Google Cloud API: The server has encountered an internal...
Read more >How to resolve Nodejs: Error: ENOENT: no such file or directory
In my project when I ran an express app I noticed that the current working directory was the root directory of the project...
Read more >Troubleshooting | Apps Script - Google Developers
There are a few possible causes for these errors: A Google server or system is temporarily unavailable. Wait for a few moments and...
Read more >A network-related or instance-specific error occurred - SQL ...
You can also view the SQL Server error log by using a text editor. By default, the error log is located at Program...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@miguelgrinberg only at macos with python3.9
I realize this issue is stale, however since this is an edge issue - and this is the first result on Google while researching, here’s how I was able to work around the issue.
Only applicable for 3.9.x from what I’ve seen
uvloop
(pip install uvloop
)import uvloop
at the beginning of your code.uvloop.install()
This should stop it from giving this issue.
Hope this helps!