0
{'type': 'service_account', 'project_id': 'abc1234', 'private_key_id': 'xxxxx', 'private_key': '-----BEGIN PRIVATE KEY-----
^ 
SyntaxError: EOL while scanning string literal

Got the above error from Pycharm when I was running the code to get the Google Sheet Credential.

Error specifically pointing to somewhere starts with \n, not sure if this is related though. The private key looks like this: '-----BEGIN PRIVATE KEY----\n...\n...

Tried the following:

  1. changing the quotation of the whole key to from " to """
  2. changing the \ to \\

Both not working.

wc0222
  • 1
  • Welcome to Stack Overflow. You are missing the closing bracket in the dictionary `}` and the `'` apostrophe that closes the string literal. – bad_coder Nov 12 '21 at 11:09

0 Answers0