question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bulk Job Retrieval Error

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jepcasteleincommented, Jan 22, 2021
0reactions
phil-eplcommented, Jan 22, 2021

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?

new_export_job_details = mc.execute(method='create_leads_export_job', 
                                    fields=['email'] 
                                    ,filters={'smartListId': '10131936'})

#enqueue a job
enqueued_job_details = mc.execute(method='enqueue_leads_export_job', job_id=new_export_job_details[0]['exportId'])

#check job status
export_job_status = mc.execute(method='get_leads_export_job_status', job_id=new_export_job_details[0]['exportId'])

# get data
export_file_contents = mc.execute(method='get_leads_export_job_file', job_id=new_export_job_details[0]['exportId'])
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bulk API 2.0 returns failed and success results with empty field ...
Retrieve a list of successfully processed or failed records for a completed job. You may notice or receive blank value (" ") for...
Read more >
Mule - Salesforce connector - Retrieve job failed results bulk v2
I am querying Salesforce Bulk api failed results in Mule. But it doesn't fetch the data. It jus shows the record id and...
Read more >
How to get error reason for bulk requests with failed records ...
(For the curious, I'm using the salesforce-bulk Python library, and used the batch_status function to get the above print out.) api · error...
Read more >
Mule - Salesforce connector - Retrieve job failed results bulk v2
I am querying Salesforce Bulk api failed results in ...
Read more >
REST API for Oracle Integration - Retrieve Error Recovery Jobs
Retrieve Error Recovery Jobs ... Retrieves a list of recovery jobs created when errored integration instances are resubmitted in a batch. Request. Supported...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found