-
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
Bulk Job Retrieval Error #52
Comments
What version of marketo-rest-python are you using? when using this method,
it should not return the ['result'] key because it's a CSV file.
…On Fri, Feb 21, 2020 at 8:58 PM Bob Koertge ***@***.***> wrote:
When trying to retrieve a bulk job file, this error is being generated:
Traceback (most recent call last): File "marketo.py", line 18, in <module>
export_file_contents = mc.execute(method='get_leads_export_job_file',
job_id='9e1f342e-9365-4173-8818-ec1971079f72') File
"/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py",
line 273, in execute result = method_map[method](*args, **kargs) File
"/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py",
line 4956, in get_leads_export_job_file return
self._export_job_state_machine('leads', 'file', *args, **kargs) File
"/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py",
line 4953, in _export_job_state_machine return result['result'] TypeError:
'Response' object is not subscriptable
Any Ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52?email_source=notifications&email_token=ADF5GQ3NEYL54JOSSCI7NPTRECWIFA5CNFSM4KZOMYG2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPORZHA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADF5GQ4RPE4JZRRAZENOZW3RECWIFANCNFSM4KZOMYGQ>
.
|
Hi @jepcastelein , I am using version 0.5.8 and I am getting the above error as well. I tried modifying the _export_job_state_machine method to You can see that the
|
@phil-epl I think the problem is that you're getting a 404 on the
So in your case the state == 'file' but the status_code is not 200. |
So what do you think would be the right way of making the "get data" part of the process wait until the file is available?
|
@phil-epl yes, you need to poll the status until it says "completed" https://developers.marketo.com/rest-api/bulk-extract/bulk-lead-extract/#polling_job_status |
When trying to retrieve a bulk job file, this error is being generated:
Traceback (most recent call last): File "marketo.py", line 18, in <module> export_file_contents = mc.execute(method='get_leads_export_job_file', job_id='9e1f342e-9365-4173-8818-ec1971079f72') File "/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py", line 273, in execute result = method_map[method](*args, **kargs) File "/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py", line 4956, in get_leads_export_job_file return self._export_job_state_machine('leads', 'file', *args, **kargs) File "/mnt/d/code/marketo/lib/python3.8/site-packages/marketorestpython/client.py", line 4953, in _export_job_state_machine return result['result'] TypeError: 'Response' object is not subscriptable
Any Ideas?
The text was updated successfully, but these errors were encountered: