IE9 Hangs Local Flask Instance

The web application I'm working on works fine under Firefox and IE8 from a virtual box. But when I try to download it using IE9, it tries to load the page, but after a while it stops loading. Then I try again to download the same URL from Firefox and it does not load at all. Then I restart Flask, and this happens - I can work with the application normally through FF, but not IE9. Looks like some kind of mistake, right?

Here is the Python exception:

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 uploaded the code to my hosting and it works great there.

I think the problem from this thread is similar to mine.

+6
source share
2 answers

Try using the werkzeug git version. According to the author , a similar error has recently been fixed.

+3
source

I had 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 only the app.run () flag as standalone?

+2
source

Source: https://habr.com/ru/post/901797/


All Articles