Am using Windows 11 and I wish to run a python socket.io server. gunicorn being incompatible with Windows, I tried using waitress to run my server using the following command waitress-serve --listen=*:8000 app:pysock and it throwed me the following exception.
There was an exception (ModuleNotFoundError) importing your module.
It had these arguments:
- No module named 'app'
Here is my python code :
# filename is pysock.py
import socketio
sio = socketio.Server()
static_files={
"/":"./public/"
}
app = socketio.WSGIApp(sio,static_files=static_files)
@sio.event
def connect(sid,environ):
print(sid,"connected")
@sio.event
def disconnect(sid):
print(sid,"disconnected")
All solutions on stack overflow were based on Flask app and am not using Flask. Is there any way to solve this exception ?
Thanks in Advance