-
Notifications
You must be signed in to change notification settings - Fork 52
Sample server / client does not work, Python 3.6.4 #30
Comments
i have same issue |
I have similar issue ERROR jp odoo.http: Exception during JSON request handling. |
Same issue, has anyone found a workaround? |
Good day, thank you all for your efforts on SOAPpy-py3.
I'm trying to run the sample server and client and while the server runs with no error,
when I try to run the client, the client produces:
Traceback (most recent call last):
File "client01.py", line 3, in
print('from server: ' + server.hello() )
File "/usr/lib/python3.6/site-packages/SOAPpy/Client.py", line 639, in call
return self.__r_call(*args, **kw)
File "/usr/lib/python3.6/site-packages/SOAPpy/Client.py", line 661, in __r_call
self.__hd, self.__ma)
File "/usr/lib/python3.6/site-packages/SOAPpy/Client.py", line 524, in __call
timeout = self.timeout)
File "/usr/lib/python3.6/site-packages/SOAPpy/Client.py", line 385, in call
data = f.read()
ValueError: read of closed file
The server produces:
*** Internal exception initial_value must be str or None, not bytes ****
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/SOAPpy/Server.py", line 230, in do_POST
parseSOAPRPC(data, header = 1, body = 1, attrs = 1, ignore_ext=self.ignore_ext)
File "/usr/lib/python3.6/site-packages/SOAPpy/Parser.py", line 1102, in parseSOAPRPC
t = _parseSOAP(xml_str, rules = rules, ignore_ext=ignore_ext)
File "/usr/lib/python3.6/site-packages/SOAPpy/Parser.py", line 1053, in _parseSOAP
inpsrc.setByteStream(StringIO(xml_str))
TypeError: initial_value must be str or None, not bytes
My SOAPpy-py3 is v0.52.24
should I change the return in the server to return (b'Hello World') ?
Maybe then have the client do something like
response = server.hello().decode('utf-8') ?
Thanks......
The text was updated successfully, but these errors were encountered: