Fail to authenticate with pydrive2 to google drive
andrei-volkau opened this issue · comments
I am using the following standard code.
from pydrive2.drive import GoogleDrive
from pydrive2.auth import GoogleAuth
# Authenticate and create the PyDrive client.
gauth = GoogleAuth()
gauth.LocalWebserverAuth()
drive = GoogleDrive(gauth)
I am getting the following error.
I am using MacOS (intel).
I was able to find such issue in stackoverflow also
https://stackoverflow.com/questions/64995468/fail-to-authenticate-with-pydrive-to-google-drive
The solution from stackoverflow is not working for me.
I am using PyDrive2 1.17.0
How can I sole the issue? I am using port 8080. Should I try another port?
What do you see in the command line when you run it and try to connect?
What do you in the command line when you run it and try to connect?
I simply execute my script via python
For example, python main.py
@andrei-volkau sorry, do you see any output there?
Are you running the code natively or in a docker image (like a colab runtime)?
Try seeing if the webserver is listening on port 8080 using lsof -i
Also try doing a tcpdump to see if the packets come through tcpdump -i lo -vvv port 8080
if in docker you'll have to pass port 8080 through to the main OS -p 127.0.0.1:8080:8080