local variable 'responses' referenced before assignment
Arcelibs opened this issue · 2 comments
我嘗試在for response in responses: 上一行加入了responses = 0
雖然能避免錯誤,但又出現了新的問題
172.16.5.66 - - [19/Sep/2022 12:58:50] "GET / HTTP/1.1" 200 -
Traceback (most recent call last):
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\gevent\pywsgi.py", line 999, in handle_one_response
self.run_application()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\geventwebsocket\handler.py", line 75, in run_application
self.run_websocket()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\geventwebsocket\handler.py", line 52, in run_websocket
list(self.application(self.environ, lambda s, h, e=None: []))
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_sockets.py", line 40, in call
handler, values = adapter.match()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\routing\map.py", line 622, in match
raise WebsocketMismatch() from None
werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
2022-09-19T04:58:50Z {'REMOTE_ADDR': '172.16.5.66', 'REMOTE_PORT': '54366', 'HTTP_HOST': '172.16.5.66:5001', (hidden keys: 30)} failed with WebsocketMismatch
Traceback (most recent call last):
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\gevent\pywsgi.py", line 999, in handle_one_response
self.run_application()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\geventwebsocket\handler.py", line 75, in run_application
self.run_websocket()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\geventwebsocket\handler.py", line 52, in run_websocket
list(self.application(self.environ, lambda s, h, e=None: []))
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_sockets.py", line 40, in call
handler, values = adapter.match()
File "C:\Users\user01\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\routing\map.py", line 622, in match
raise WebsocketMismatch() from None
werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
2022-09-19T04:58:50Z {'REMOTE_ADDR': '172.16.5.66', 'REMOTE_PORT': '54367', 'HTTP_HOST': '172.16.5.66:5002', (hidden keys: 30)} failed with WebsocketMismatch
上面timeout了吧,确认下全局代理能不能正常连接到谷歌服务