About "Init Drive Client" keyword

Sir,
I used command:“rpa-google-oauth --service drive” and get credentials, and save it in cloud vault.
Now, I use this code:

*** Keywords ***
Set up Google Drive authentication
Set Robocloud Vault vault_name=googlecloud
Init Drive Client. use_robocloud_vault=Ture

return error:

Set up Google Drive authentication | FAIL |
TypeError: can only concatenate list (not “NoneType”) to list

I don’t know how to do, help me, please!

Hi @brucewh8 and welcome to the Forum! :smiley: sorry about your issue with Google library.

The library has been refactored a bit and its new release will be announced today, but I am giving you the example which is based on that new release.

The Google package has been already released as a separate PyPI package.

I have attached conda.yaml and tasks.robot where I used OAuth token to access Google Drive.

conda.yaml

channels:
  - conda-forge

dependencies:
  - python=3.7.5
  - pip=20.1
  - pip:
    - rpaframework==9.6.0
    - rpaframework-google==0.2.2

tasks.robot

*** Settings ***
Library           RPA.Cloud.Google
...               vault_name=googlecloud
...               vault_secret_key=oauth
...               cloud_auth_type=token

*** Tasks ***
Minimal task
    Init Drive
    ${files}=    Search Drive Files    name contains '.png'
    FOR    ${f}    IN    @{files}
        Log To Console    \n${f}
    END

@brucewh8 and I realized that some of the keyword names has been changed, for the Drive service changes are:

Keyword Conversion list:
rpaframework[google] 9.6.0 or older on the left
rpaframework-google 0.2.2 onwards on the right

  • drive create directorycreate drive directory
  • drive delete filedelete drive file
  • drive download filesdownload drive files
  • drive export fileexport drive file
  • drive get folder idget drive folder id
  • drive move filemove drive file
  • drive search filesearch drive files
  • drive update fileupdate drive file
  • drive upload fileupload drive file
  • init drive clientinit drive
  • init drive client service accountinit drive

Thanks mika, it succeeded.
That’s great, thanks so much for your help.

1 Like

Great! I made a longer list of all keyword changes happening in the new rpaframework-google package https://forum.robocorp.com/t/google-library-released-as-separate-pypi-package