-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I might be doing something wrong here but just in case:
Calling send_letter and getting 'str' object has no attribute 'keys' but having successful letters go through
invoiced-python/invoiced/objects.py
Line 285 in 30e1ec0
| return util.build_objects(letter, response['body']) |
response['body'] is a flat dict and I think build_objects is looking for a list of dicts to convert. That would match up with the attachments and sms endpoints which return lists
Traceback
send_result = inv_invoice.send_letter(idempotency_key=idempotency_key)
File "\.venv\lib\site-packages\invoiced\objects.py", line 285, in send_letter
return util.build_objects(letter, response['body'])
File "\.venv\lib\site-packages\invoiced\util.py", line 5, in build_objects
return list(map(lambda obj: convert_to_object(_class, obj), objects))
File "\.venv\lib\site-packages\invoiced\util.py", line 5, in <lambda>
return list(map(lambda obj: convert_to_object(_class, obj), objects))
File "\.venv\lib\site-packages\invoiced\util.py", line 14, in convert_to_object
if 'object' in values.keys():
AttributeError: 'str' object has no attribute 'keys'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels