Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
389 views
in Technique[技术] by (71.8m points)

python - Plaid: 'client_id must be a properly formatted, non-empty string'

I am creating an application.

PLAID_CLIENT_ID = os.getenv('PLAID_CLIENT_ID')
PLAID_SECRET = os.getenv('PLAID_SECRET')

client = plaid.Client(client_id=PLAID_CLIENT_ID,
                      secret=PLAID_SECRET,
                      environment='development')

access_token = #Access Token

response = client.Accounts.balance.get(access_token)
accounts = response['accounts']

accountsTwo = accounts[0]['balances']['available']
#accountsThree = accountsTwo['balances']
#accountsFour = accountsThree['current']

jsonobj = json.dumps(accounts, indent = 4)

print(jsonobj)
print('-------------------------------------------------')
print(accountsTwo)

But I am getting an error saying

  File "c:Userscallmgitquickstartpythonfind.py", line 26, in <module>
    response = client.Accounts.balance.get(access_token)
  File "C:PythonPython39libsite-packagesplaidapiaccounts.py", line 22, in get
 line 68, in _http_request
    raise PlaidError.from_response(response_body)
plaid.errors.InvalidRequestError: client_id must be a properly formatted, non-empty string

It works fine in the debugger, but when I run it from my terminal it doesn't work. Let me know if you can figure it out please!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...