Comments (11)
https://developers.google.com/drive/api/v3/shortcuts
targetID and targetMimeType not applied in pydrive2?
from pydrive2.
Could you try to do FetchMetadata
and pass shortcutDetails
to the fields
?
example is here- https://iterative.github.io/PyDrive2/docs/build/html/filemanagement.html#handling-special-metadata
from pydrive2.
thank you very much.
file.FetchMetadata(fields='shortcutDetails') get nothing
file.FetchMetadata(fetch_all=True),get 403 error:
domain | "usageLimits"
reason | "dailyLimitExceededUnreg"
message | "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
extendedHelp | "https://code.google.com/apis/console"
code | 403
message | "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
but I have already signuped.
from pydrive2.
@hagemouse hmm, what fileId do you pass to the CreateFile
? It should be Id of the shortcut. Could you try to pass some other attributes - mimeType
, name
?
dailyLimitExceededUnreg
- is is a public file? It's a regular thing for files that are publicly shared by someone to hit those limits.
from pydrive2.
Thank you for your reply.
The folder is public shared. I passed the id of the shortcut(a folder) , CreateFile({"id": fileId}). I tried more field , and got the same result.
I think the error came from FetchMetadata. If I passed a field that doesn't exist, such as FetchMetadata(field="abc"), it will raise 403 error. FetchMetadata(fetch_all=True) got 403 error too.
If I just use FetchMetadata() with no para, there is no field called targetId.
from pydrive2.
Another problem is, it seems that there is not a function in pydrive2 than can be used to get the list of team drives. And I can not get the correct name(title) of team drives by FetchMetadata(driveId), all of them are same:"Team Drive".
from pydrive2.
Could you try to open https://developers.google.com/drive/api/v2/reference/files/get, click "Try it" to the right and run the query, with the same ID (there is Show standard parameters expand_more
link for the fields parameter`)
Same for the drives list - we need to see it's working in the explorer to understand what is missing.
from pydrive2.
from v2 to v3:
- title -> name
- "parents" type changed to list
- added new field "shortcutDetails" for shortcut ,which referring to the real id of the file.
- extended "capabilities"
- reduce many fields
- get all fields of a files with 'fields = "*"' in v3
can not get team drive list or names from files.get. have to use drives.get. but I did not find it in pydrive2.
from pydrive2.
For shortcutDetails
, I can't reproduce this. Even V2 explorer gives me details. If you item is located on a team drive, could you try to set supportsAllDrives
true
?
can not get team drive list or names from files.get. have to use drives.get. but I did not find it in pydrive2.
what are you trying to do here? why do you need a list of all drives?
from pydrive2.
When have a fileId ,I want to make a full path like this: /gdrive/Shareddrives/a/b/c/1.zip. But now I think I can write the ids and name of my team drives as a tuple.
Thank you very much.
from pydrive2.
so, does it mean the problem is solved? I'm closing the issue then, feel free to reopen if needed.
from pydrive2.
Related Issues (20)
- Cannot install PyDrive2 (Raspberry PI3A+)
- error: from pydrive2.auth import GoogleAuth HOT 7
- How to distinguish between same-named files and directories in Google Drive
- How to distinguish between same-named files and directories in Google Drive HOT 1
- A simple way of initializing a pydrive.GoogleDrive object fails when pydrive is replaced by pydrive2 HOT 1
- Cant copy the file... using service account HOT 3
- Fail to authenticate with pydrive2 to google drive HOT 4
- Access blocked: This application request is invalid HOT 1
- Is there a Google Drive file sharing feature? HOT 3
- Unable to list files with service account auth for GDriveFilesystem HOT 3
- How do I write to specific tab? HOT 1
- fetch a specific folder id by folder name HOT 4
- Missing 1.17.1 release? HOT 1
- auth: LocalWebserverAuth: fail if in non-interactive mode
- ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2427) HOT 2
- Review and fix issues with find
- Create Succesfull Authentication using Google OAuth client ID for a remote server accessible via SSH in a local machine HOT 1
- AssertionError on using fsspec with service account HOT 1
- [Q]Set Disable Download HOT 1
- Would you be interested to add type hints?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydrive2.