I tried simple test code:
from flask import Flask, jsonify, request, render_template
from flask_socketio import SocketIO
class REST():
def init(self):
self.app = Flask(name)
self.app.config['SECRET_KEY'] = 'freego!'
# , async_mode="eventlet"
self.socketio = SocketIO(self.app)
def run(self):
#self.init_routes()
self.socketio.run(self.app, host='0.0.0.0', port=4444)
REST().run()
run it without problem, but pack it with: pyinstaller --onefile test.py
and run test.exe, I got :
Traceback (most recent call last):
File "
File "
File "site-packages\flask_socketio__init__.py", line 119, in init
File "site-packages\flask_socketio__init__.py", line 144, in init_app
File "site-packages\socketio\server.py", line 72, in init
File "site-packages\engineio\server.py", line 100, in init
ValueError: Invalid async_mode specified
test returned -1
I tried with or without eventlet installed, or without --onefile, or pyinstaller --onefile --hidden-import=eventlet -F test.py
it's no differrent.
any suggestion?
Closing this, as it has been addressed here: https://github.com/miguelgrinberg/python-socketio/issues/35.
What is the real solution? It still does not work for me.
What is the real solution? It still does not work for me.
https://github.com/miguelgrinberg/python-socketio/issues/35#issuecomment-482350874
Most helpful comment
What is the real solution? It still does not work for me.