Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Lib in Py 3 and beyond is not working #24

Open
SupreetBose opened this issue Nov 30, 2021 · 0 comments
Open

Using Lib in Py 3 and beyond is not working #24

SupreetBose opened this issue Nov 30, 2021 · 0 comments

Comments

@SupreetBose
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant