Skip to content

Commit 9cca4ac

Browse files
committed
Fix pdf sending error at python 2
1 parent e0ce235 commit 9cca4ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

quickbooks/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def make_request(self, request_type, url, request_body=None, content_type='appli
195195
"""
196196
) % (boundary, request_body, boundary, content_type, binary_data, boundary)
197197

198+
# make sure request_body is not unicode (python 2 case)
199+
request_body = str(request_body)
200+
198201
req = self.process_request(request_type, url, headers=headers, params=params, data=request_body)
199202

200203
if req.status_code == httplib.UNAUTHORIZED:

0 commit comments

Comments
 (0)