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

Use of setLocation causes later AttributeError: 'str' object has no attribute 'decode' #45

Closed
hatchjdecho opened this issue Nov 4, 2019 · 1 comment

Comments

@hatchjdecho
Copy link
Contributor

In wsdl.py when using the method Service.setLocation() to override a wrong location in the wsdl it stores the raw string. (line 860: m.location = url)

However the method SoapClient.location in client.py uses self.method.location.decode('utf-8')
This is compatible with the Port.init which sets the self.location with .encode('utf-8')

So when trying to use the service after using setLocation() the string fails to decode with the error in the title.

I believe the correct fix would be to change Service.setLocation() in wsdl.py at line 860 to use m.location = url.encode('utf-8').

Cheers
James.

hatchjdecho added a commit to hatchjdecho/suds-py3 that referenced this issue Nov 4, 2019
cackharot added a commit that referenced this issue Mar 5, 2020
Resolves issue #45 fix required as result of change in #40
@cackharot
Copy link
Owner

Merged will release a new version along with other non breaking fixes.

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

2 participants