Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

SOAPProxy call errors out TypeError: expected bytes-like object, not str #37

Open
PratikSawant01 opened this issue Sep 15, 2021 · 0 comments

Comments

@PratikSawant01
Copy link

I think the base64 encoding is incorrectly handled here, also encodestring is deprecated.

this should be something like below
val = base64.encodestring(urllib.parse.unquote_plus(addr.user).encode())

the encode string errors out saying: TypeError: expected bytes-like object, not str

Location: https://github.com/Synerty/SOAPpy-py3/blob/master/src/SOAPpy/Client.py#L317
if addr.user != None:
val = base64.encodestring(urllib.parse.unquote_plus(addr.user))
r.putheader('Authorization','Basic ' + val.replace('\012',''))

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

No branches or pull requests

1 participant