namaggarwal / splitwise

Python SDK for Splitwise
MIT License
183 stars 46 forks source link

Receive Splitwise bad request exception 400 when create expense with setReceipt #79

Closed dannywonglh closed 1 year ago

dannywonglh commented 1 year ago

This used to work months ago, and then all of a sudden stopped working. This will work only when expense.setReceipt is being commented out.

I'm using Pyto on iOS to run the script, used to work perfectly.

Here's excerpts of the script for your reference.

splitwisePath = file_system.FolderBookmark('splitwisePath').path
receiptPath = splitwisePath + '/Receipt/'

sObj = Splitwise("xxx","xxx",api_key="xxx")

receiptFullPath = receiptPath + 'receipt.PNG'
expense = Expense()
expense.setCost('5')
expense.setDescription("Bill - Jan 2023")
expense.setGroupId(########)
expense.setSplitEqually(True)
expense.setReceipt(receiptFullPath)
expense, errors = sObj.createExpense(expense)
print("Error upload to Splitwise: ", errors)
namaggarwal commented 1 year ago

This is fixed in master, will be released in upcoming version

namaggarwal commented 1 year ago

Fixed in v3.0.0