Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to authenticate with pydrive2 to google drive #300

Open
andrei-volkau opened this issue Aug 30, 2023 · 4 comments
Open

Fail to authenticate with pydrive2 to google drive #300

andrei-volkau opened this issue Aug 30, 2023 · 4 comments
Labels
question Further information is requested triage

Comments

@andrei-volkau
Copy link

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.
Screenshot 2023-08-30 at 23 20 38

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?

@andrei-volkau andrei-volkau changed the title Can't connect to localhost while doing auth process Fail to authenticate with pydrive2 to google drive Aug 30, 2023
@shcheklein
Copy link
Member

shcheklein commented Aug 30, 2023

What do you see in the command line when you run it and try to connect?

@shcheklein shcheklein added question Further information is requested triage labels Aug 30, 2023
@andrei-volkau
Copy link
Author

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

@shcheklein
Copy link
Member

@andrei-volkau sorry, do you see any output there?

@casesolved-co-uk
Copy link

casesolved-co-uk commented May 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triage
Projects
None yet
Development

No branches or pull requests

3 participants