A web app I am working on works fine under Firefox and IE8 from virtual box. But when I try to load it with IE9, it tries to load the page but after a while stops loading. Then I try to load the same url with Firefox again and it doesn't load at all. Then I restart Flask and the same happens - I can work normally with the app through FF but not IE9. Looks like a kind of a bug, doesn't it?
Here is the exception Python throws:
Exception happened during processing of request from ('127.0.0.1', 6924)
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\SocketServer.py", line 639, in __init__
self.handle()
File "C:\Users\Cosmo\AppData\Roaming\Python\Python27\site-packages\werkzeug\serving.py", line 189, in handle
return rv
UnboundLocalError: local variable 'rv' referenced before assignment
I have uploaded code to my hosting and it works fine there.
I think the issue from this thread is similar to my one.
Try using a git version of werkzeug. According to the author, a similar bug was recently fixed.
I've been having problems with IE hanging my flask server with more recent versions of Flask/Werkzeug (+2 years from this thread). The solution I found was to use run(threaded=True)
as described in this other question: Can I serve multiple clients using just Flask app.run() as standalone?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With