Open neuron-whisperer opened 1 year ago
It's hard to know what's going wrong without seeing your code, but here's what I know:
# Original author: Evren Yurtesen - https://github.com/yurtesen/
client_config_backend: settings
client_config:
client_id: <YOUR CLIENT ID GOES HERE>
client_secret: <YOUR CLIENT SECRET GOES HERE>
auth_uri: https://accounts.google.com/o/oauth2/auth
token_uri: https://accounts.google.com/o/oauth2/token
redirect_uri: urn:ietf:wg:oauth:2.0:oob
revoke_uri:
save_credentials: True
save_credentials_backend: file
save_credentials_file: ./creds.json
get_refresh_token: True
oauth_scope:
- https://www.googleapis.com/auth/drive.file
from pydrive2.auth import GoogleAuth
gauth = GoogleAuth()
gauth.LocalWebserverAuth()
Maybe you already had a valid auth token and the issue isn't that. Another thing to make sure of is that you're specifying the folder ID to upload the file to in Google Drive. To get your folder ID, navigate to the folder that you want the files in and copy the last part of the URL: https://drive.google.com/drive/u/1/folders/<YOUR FOLDER ID>, and try out the example script [Upload-and-autoconvert-to-Google-Drive-Format-Example](https://github.com/iterative/PyDrive2/blob/main/examples/Upload-and-autoconvert-to-Google-Drive-Format-Example/upload.py). You'll need to pass the folder ID as the first parameter, and the local path of the file to upload as the second parameter.
If none of this helped, I'd need to see your code to help more.
This is a really simple question. Not really a GitHub issue, but I have no idea where else to ask it.
I installed PyDrive2, created a project, created a service account, granted permissions, downloaded the permissions.json file, and cobbled together a basic Python script to store files on the account via PyDrive2. So far, so good.
The only problem is that I cannot, for the life of me, figure out how to view documents uploaded through PyDrive2 in either Google Drive or Google Cloud Platform. Things that I tried without success:
So, as it stands, I can't view PyDrive2-uploaded documents through any kind of file UI. It's like they just disappear into the cloud and are accessible only through PyDrive2.
Any suggestions?