invoice.send() fails rather mysteriously after invoice.save()
ExTechOp opened this issue · comments
I've been testing building Holvi invoices from csv data exported from a database. That worked fine, the data got saved to Holvi correctly with invoice.save()
and could then be sent manually from the webUI.
Now, when I tried to also do invoice.send()
immediately after I had done invoice.save()
, things went egg-shaped with:
Traceback (most recent call last):
File "./holvi_makeinvoice.py", line 80, in <module>
invoice.send()
File "/usr/lib/python2.7/site-packages/holviapi/invoicing.py", line 66, in send
stat = self.api.connection.make_put(url, payload)
File "/usr/lib/python2.7/site-packages/holviapi/connection.py", line 71, in make_put
return self._make_ppp('put', url, payload)
File "/usr/lib/python2.7/site-packages/holviapi/connection.py", line 92, in _make_ppp
raise ApiError(e.__str__(), response=e.response) # six.u messes this up
File "/usr/lib/python2.7/site-packages/holviapi/errors/__init__.py", line 22, in __init__
self.error_details = self.response.json()
File "/usr/lib/python2.7/site-packages/requests/models.py", line 805, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python2.7/site-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 374, in decode
obj, end = self.raw_decode(s)
File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 404, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 5 column 1 (char 4)
The error message is rather opaque, I would appreciate some instructions on how to start debugging this.
probably holvi side error, anyway the dangerous tests which send invoice after creating it pass for me.