You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to make it run on Ubuntu 20.04.2 but it doesn't seem to work.
I got the following error OSError: [Errno 98] Address already in use.
Nothing is running on this address.
flask run
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [15/May/2021 00:53:06] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [15/May/2021 00:54:10] "OPTIONS /privacyAPI/v1/ HTTP/1.1" 200 -
usrjson['usrchoice'] = top_choice
client_secret.json-gmail-v1-(['https://www.googleapis.com/auth/gmail.modify'],)
[2021-05-15 00:54:10,088] ERROR in app: Exception on /privacyAPI/v1/ [POST]
Traceback (most recent call last):
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/t0_0rk/Projets/privacybot/app/app.py", line 32, in executePrivacyAPI
"return": privacyAPI(usrjson, services)
File "/home/t0_0rk/Projets/privacybot/app/corefunctions.py", line 259, in privacyAPI
sendEmail(usrjson, service_map)
File "/home/t0_0rk/Projets/privacybot/app/corefunctions.py", line 73, in sendEmail
gmail_service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES)
File "/home/t0_0rk/Projets/privacybot/app/Google.py", line 32, in Create_Service
cred = flow.run_local_server()
File "/home/t0_0rk/Projets/privacybot/PB_venv/lib/python3.8/site-packages/google_auth_oauthlib/flow.py", line 460, 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 use127.0.0.1 - - [15/May/202100:54:10] "POST /privacyAPI/v1/ HTTP/1.1" 500 -
The text was updated successfully, but these errors were encountered:
It seems to have worked but I was never asked to allow access to gmail or something ...
So when I check my sent mails in Gmail, of course there is nothing ...
@nhevia provided the right answer here and also exposed our bad code with the hard coding thing lol - but in fairness Flask running local should default to port 5000. I have seen this specific error before and as @nhevia mentioned killing anything on PID before running and this worked when I ran across this - usually with a random tab / old project in VScode was the culprit/
I tried to make it run on Ubuntu 20.04.2 but it doesn't seem to work.
I got the following error
OSError: [Errno 98] Address already in use
.Nothing is running on this address.
The text was updated successfully, but these errors were encountered: