Question

Google Drive Connector


I am having an issues listing the contents of a google drive folder. 

First I receive this warning "

Google Drive: SSL certificate verification failed for host 'www.googleapis.com'. HTTPS connections may not be secure. Disabling verification of SSL certificates. Message: HTTPSConnectionPool(host='www.googleapis.com', port=443): Max retries exceeded with url: /drive/v3/files/14VXm0wlvHZuW9tkS46VAWE1MYeIJpkAP?fields=id%2Cname%2CmimeType%2Csize%2CwebViewLink%2CmodifiedTime%2Cparents&prettyPrint=false (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)"

 

Then the translation continues and I receive this error:"

ile "C:\Program Files\FME\python\requests\models.py", line 940, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:"

 

click on the url in the python error and I recieve this message"

{"error":{"errors":[{"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."}}"

So I attempted to set up an api key account which I'm not sure is the right path to be going down. Any input as to how I can get google drive connector to list all my files would be most helpful.

 

Thanks!


6 replies

Badge +2

Hi @j87foster,

Looking at another forum thread, I found that this could potentially be due to a failed authentication. Have you tried deleting the Google Drive web connection and re-authenticating? You can delete the web connection in Tools > FME Options > Web Connections and then re-add the web connection either in the FME Options dialog or in the GoogleDriveConnector.

Once you re-authenticate, are you able to select the files from your Google drive if you set the Google Drive Action to Download in the GoogleDriveConnector or does the error still show up?

Hi @j87foster,

Looking at another forum thread, I found that this could potentially be due to a failed authentication. Have you tried deleting the Google Drive web connection and re-authenticating? You can delete the web connection in Tools > FME Options > Web Connections and then re-add the web connection either in the FME Options dialog or in the GoogleDriveConnector.

Once you re-authenticate, are you able to select the files from your Google drive if you set the Google Drive Action to Download in the GoogleDriveConnector or does the error still show up?

I can see all of the files in a particular folder when I set the google drive connector folder to download. So I'm not sure what's going on.

Badge +2

I can see all of the files in a particular folder when I set the google drive connector folder to download. So I'm not sure what's going on.

Interesting one, @j87foster. When you set up your Google+API, did you follow steps similar to this? Another possible reason could be that the url is missing the authorization http header according to this thread?

Hi @j87foster @chrisatsafe,

Did you ever find a solution to this? I keep running into this issue for different folders of data stored on Google Drive. I experienced the issue in the past but it seemed to fix itself when I replaced my web connection, but that doesn't appear to fix the problem now. I have successfully managed to retrieve the links to 1000's of objects stored on Google Drive in the past but now I'm trying again with a new set of data it fails.

I suspect it's an issue with retrieving the list of files when "subfolders" is ticked, as this is the only time I experience this error message.

This error occurs for me when trying to retrieve a list of files (including subfolders), which always stops after 121 features are retrieved, but if I select one of the subfolders I can successfully retrieve 1000+ files without error. The strange thing is that this was working yesterday for me (with include subfolders ticked), but isn't working today after uploading a new folder within the directory.

I have tried replacing the web connection, re-authenticating the connection, replacing the Google Drive connector, making sure Google Drive Api is turned on, using a decelerator to limit the rate of features to below 1000 requests per 100 seconds (G Drive limit), and even making the data public temporarily in GDrive. None of this fixes the issue apart from unticking "include subfolders" in the Google Drive connector, which does not provide a good enough workaround for what I need to do.

It does seem like the connector only works for listing the files within single subfolders as this error occurs after reading the first subfolders contents (e.g. Project > Folder 1 > * Files), and fails before trying to read the next subfolder (e.g. Project > Folder 2 > * Files).

Edit:I have managed a workaround for this by using multiple Google Drive connectors and passing the folder ID for each subfolder, and setting the "Include Subfolders" to "No". I'll leave this comment here in-case anyone else encounters the same problem.

Thanks,

James

 

Hi @j87foster @chrisatsafe,

Did you ever find a solution to this? I keep running into this issue for different folders of data stored on Google Drive. I experienced the issue in the past but it seemed to fix itself when I replaced my web connection, but that doesn't appear to fix the problem now. I have successfully managed to retrieve the links to 1000's of objects stored on Google Drive in the past but now I'm trying again with a new set of data it fails.

I suspect it's an issue with retrieving the list of files when "subfolders" is ticked, as this is the only time I experience this error message.

This error occurs for me when trying to retrieve a list of files (including subfolders), which always stops after 121 features are retrieved, but if I select one of the subfolders I can successfully retrieve 1000+ files without error. The strange thing is that this was working yesterday for me (with include subfolders ticked), but isn't working today after uploading a new folder within the directory.

I have tried replacing the web connection, re-authenticating the connection, replacing the Google Drive connector, making sure Google Drive Api is turned on, using a decelerator to limit the rate of features to below 1000 requests per 100 seconds (G Drive limit), and even making the data public temporarily in GDrive. None of this fixes the issue apart from unticking "include subfolders" in the Google Drive connector, which does not provide a good enough workaround for what I need to do.

It does seem like the connector only works for listing the files within single subfolders as this error occurs after reading the first subfolders contents (e.g. Project > Folder 1 > * Files), and fails before trying to read the next subfolder (e.g. Project > Folder 2 > * Files).

Edit:I have managed a workaround for this by using multiple Google Drive connectors and passing the folder ID for each subfolder, and setting the "Include Subfolders" to "No". I'll leave this comment here in-case anyone else encounters the same problem.

Thanks,

James

 

thanks for the response I will give your work around a try!

thanks for the response I will give your work around a try!

It turns out this is an authentication issue. Using the standard FME GDrive web connection does not consistently work. You need to do as @chrisatsafe has mentioned below and set up your own Google Drive web connection using your own authentication details, generated from the Google Drive API developers web page. Once this is setup you'll be able to see statistics on the Google Drive quota page that show the number of requests made per day.

 

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/!NamedConnections/options_web_service_connections.htm

Reply