Search code examples
python-3.xpython-2.7salesforcebulk

'SalesforceBulk' object has no attribute 'post_bulk_batch'


I'm trying to run a bulk job in salesforce. After creating job and prepared csv_iterator through my data, when i ran this

batch = bulk.post_bulk_batch(job, csv_iterator)

I'm getting the error stating

AttributeError: 'SalesforceBulk' object has no attribute 'post_bulk_batch'

I've installed salesforce_bulk in python2 and 3 as well. Tried in both versions, but same error. Why is this happens. How to rectify this issue? Thanks in advance.

UPDATE:

I have installed the version salesforce-bulk==1.1.0 Now it is working in python2 but in python3 this is what happening

from salesforce_bulk import SalesforceBulk
ImportError: cannot import name 'SalesforceBulk'

Is there no support for python 3 to do salesforce bulk job process?


Solution

  • Found it! In python3 install version salesforce-bulk == 2.1.0 and change the method name post_bulk_batch to post_batch That's it do the trick!