Open ntorba opened 2 years ago
Are you using latest versions of all the related packages? turbo-flask, flask-sock, simple-websocket, flask, werkzeug.
In my case. I seen this error and thought that I mis-configured flask as I am putting fundamental design pattern wsgi -> url -> controller -> ... -> model
flask_app | 172.18.0.1 - - [15/Jun/2022 10:10:41] "GET /test HTTP/1.1" 500 -
flask_app | Error on request:
flask_app | Traceback (most recent call last):
flask_app | File "/var/lang/lib/python3.9/site-packages/werkzeug/serving.py", line 324, in run_wsgi
flask_app | execute(self.server.app)
flask_app | File "/var/lang/lib/python3.9/site-packages/werkzeug/serving.py", line 316, in execute
flask_app | write(data)
flask_app | File "/var/lang/lib/python3.9/site-packages/werkzeug/serving.py", line 264, in write
flask_app | assert status_set is not None, "write() before start_response"
flask_app | AssertionError: write() before start_response
Turns out, I missed importing json while I was using it in return
Resolved just by adding import json
Not sure if it's going to help you or not. But I hope it give you a perspective
I notice me too this error on development wekzeug during a disconnection. Seems that there is a race condition during an assertion on write() method. The slang "assert" suggest me that is a test unit or similar integrated into wekzeug server. This server its used only on development mode. My question is: are there some side effects during developing if I consider this error only a noise? so I can ignore without fear?
thank in advance
are there some side effects during developing if I consider this error only a noise?
Aside from the annoyance of seeing the error I don't think there is any concern. You should definitely use a production server when you get to deploy this for real, Werkzeug should never be used in production.
Hello,
I am seeing an error from Werkzeug in the logs of my application, but it doesn't seem to effect the functioning of my app (at least in what I've been working on so far..)
Here are the logs:
The app seems to function fine, I am getting a turbo frame (but I am not currently using streams or more advanced features, so I might notice the issue when I get there)
Has anyone else seen this?
Thanks