I had the same error as yours.
My flask server was installed inside respberry-pi and I was trying to access it using https://ip:5000.
The problem was I was using https instead of http.
When I changed it to http://ip:5000, it worked.
I had the same error as yours.
My flask server was installed inside respberry-pi and I was trying to access it using https://ip:5000.
The problem was I was using https instead of http.
When I changed it to http://ip:5000, it worked.