-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'access_token' in authenticate method after updates on June 30 #62
Comments
@linasaltanav it works for me. How are you creating the MarketoClient? I've tested these variations:
|
Yes, I create the same way. mc = MarketoClient(args.munchkin_id, args.client_id, client_secret). |
@linasaltanav thanks for the details. It sounds like refreshing the token for long-running processes doesn't work correctly with the latest version. Please revert to the previous version 0.5.10 while I investigate this. |
I reviewed the most recent change and I don't immediately see how those changes may have caused the error you experienced. The error occurs because the authentication call to Here are the changes: |
Unfortunately reverting to version 0.5.10 was not successful. It is not one-off issue. I have restarted it yesterday, same error. |
@linasaltanav thanks for reporting back. Do you mean you still get the error with 0.5.10 or that - due to your setup - you cannot revert back to an older version of the library? |
I have reverted to the previous version 0.5.10 and still have the issue. I am debugging the issue as well, let you know if I find more details on that. |
I finally catch the payload in the authentication method. it returns |
Looks like it makes sense to add 'server_error' into authenticate. |
Export Marketo list fails with
result_text += future.result()
File "/opt/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/opt/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/opt/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/etl/imports/marketo/python_scripts/export_marketo_leads.py", line 42, in export_leads
filters={args.filters: list_id})
File "/home/ec2-user/.local/lib/python3.7/site-packages/marketorestpython/client.py", line 299, in execute
result = method_map[method](*args, **kargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/marketorestpython/client.py", line 5303, in create_leads_export_job
return self._create_bulk_export_job('leads', *args, **kargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/marketorestpython/client.py", line 5248, in _create_bulk_export_job
self.authenticate()
File "/home/ec2-user/.local/lib/python3.7/site-packages/marketorestpython/client.py", line 328, in authenticate
self.token = data['access_token']
KeyError: 'access_token'
The text was updated successfully, but these errors were encountered: