From c8b1d22c5d28b035c90f8bc9df34434539172a3e Mon Sep 17 00:00:00 2001 From: alejandro Date: Tue, 31 Jan 2023 10:23:42 +0100 Subject: [PATCH] change parameter --creds_Base64 --- pandora_plugins/google_sheets/pandora_googlesheet.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_plugins/google_sheets/pandora_googlesheet.py b/pandora_plugins/google_sheets/pandora_googlesheet.py index d02fc4cd3b..bfa346aa40 100644 --- a/pandora_plugins/google_sheets/pandora_googlesheet.py +++ b/pandora_plugins/google_sheets/pandora_googlesheet.py @@ -21,7 +21,7 @@ Version = {__version__} Manual execution -python3 pandora_googlesheets.py --creds_json/creds_base64 --row --column +python3 pandora_googlesheets.py --creds_json/creds_base64 --name --sheet --cell --row --column """ @@ -47,9 +47,7 @@ if args.creds_json is not None and args.creds_base64 == None: ## authenticate with base64 input elif args.creds_base64 is not None and args.creds_json== None: ## base64 to json - with open(args.creds_base64, 'r') as file: - data = file.read().replace('\n', '') - text=base64.b64decode(data).decode('utf-8') + text=base64.b64decode(args.creds_base64).decode('utf-8') with open("cred.json", "w") as outfile: outfile.write(text) creds = ServiceAccountCredentials.from_json_keyfile_name("cred.json", scope)