xyou365 / AutoRclone

AutoRclone: rclone copy/move/sync (automatically) with thousands of service accounts
https://www.gfan.loan/?p=235
1.36k stars 520 forks source link

Step 2 throws "KeyError: 'installed'" #55

Closed EpicLPer closed 4 years ago

EpicLPer commented 4 years ago

Heya!

When doing Step 2, aka. running python3 gen_sa_accounts.py --quick-setup 1 (in my case just with python since it's already v3) I get the following error:

C:\Users\epicl\Downloads\AutoRclone-master>python gen_sa_accounts.py --quick-setup 1
Traceback (most recent call last):
  File "gen_sa_accounts.py", line 311, in <module>
    resp = serviceaccountfactory(
  File "gen_sa_accounts.py", line 161, in serviceaccountfactory
    proj_id = loads(open(credentials,'r').read())['installed']['project_id']
KeyError: 'installed'

Any way to fix this? The same happens on Ubuntu btw.

EpicLPer commented 4 years ago

Figured it out now. If you don't choose "Desktop application" when enabling the Python API it'll download a credentials.json file with a format that AutoRClone didn't expect. The "Other" option doesn't exist anymore, so yeah.

Will close this now.