I am stuck with this error: OSError: [Errno 98] Address already in use
I tried every possible solution but still no luck. I am using oauthlib to authorize the user but when the user is redirected back to the website it get stuck and loads for ever.
However loading the website without authorization works fine.
my main app : if name =="main": path = "/home/kxchan86/project" if path not in sys.path: sys.path.insert(0, path) print(sys.path) app.run()
error:
Traceback (most recent call last): File "/home/kxchan86/.virtualenvs/venv/lib/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/home/kxchan86/.virtualenvs/venv/lib/python3.8/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/kxchan86/.virtualenvs/venv/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/home/kxchan86/.virtualenvs/venv/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/kxchan86/project/main.py", line 375, in home service = Create_Service(Client_Sercret_File,API_NAME,API_VERSION,SCOPES) File "/home/kxchan86/project/Google.py", line 34, in Create_Service cred = flow.run_local_server() File "/home/kxchan86/.virtualenvs/venv/lib/python3.8/site-packages/google_auth_oauthlib/flow.py", line 457, in run_local_server local_server = wsgiref.simple_server.make_server( File "/usr/lib/python3.8/wsgiref/simple_server.py", line 154, in make_server server = server_class((host, port), handler_class) File "/usr/lib/python3.8/socketserver.py", line 452, in init self.server_bind() File "/usr/lib/python3.8/wsgiref/simple_server.py", line 50, in server_bind HTTPServer.server_bind(self) File "/usr/lib/python3.8/http/server.py", line 138, in server_bind socketserver.TCPServer.server_bind(self) File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind self.socket.bind(self.server_address) OSError: [Errno 98] Address already in use