You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using sample code xml_req = connections.Request(app, auth, xml_data).tostring()
Above line is giving error as below : TypeError: can only concatenate str (not "bytes") to str
I am using Py 3.9 how should I proceed ? If I remove tostring from xml_req then I get the below error TypeError: message_body should be a bytes-like object or an iterable, got <class 'oaxmlapi.connections.Request'>
My code that I used is as below to pull data req = urllib.request.Request(url='Url Path', data=xml_req)
response = urllib.request.urlopen(req)
html = response.read()
print(html)
Any thoughts ?
The text was updated successfully, but these errors were encountered:
Using sample code
xml_req = connections.Request(app, auth, xml_data).tostring()
Above line is giving error as below :
TypeError: can only concatenate str (not "bytes") to str
I am using Py 3.9 how should I proceed ? If I remove tostring from xml_req then I get the below error
TypeError: message_body should be a bytes-like object or an iterable, got <class 'oaxmlapi.connections.Request'>
My code that I used is as below to pull data
req = urllib.request.Request(url='Url Path', data=xml_req)
response = urllib.request.urlopen(req)
html = response.read()
print(html)
Any thoughts ?
The text was updated successfully, but these errors were encountered: