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
We are using the following combination (rpyc+openapi+urllib3) for processing REST requests and ran into this error.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/rpyc/core/protocol.py", line 359, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/rpyc/core/protocol.py", line 837, in _handle_call
return obj(*args, **dict(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/cna/cna-nf_sim/nf_sim/lib/python3/openapi/rest.py", line 502, in POST
return self.request("POST",
^^^^^^^^^^^^^^^^^^^^
File "/usr/cna/cna-nf_sim/nf_sim/lib/python3/openapi/rest.py", line 315, in request
r = self.pool_manager.request(method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/_request_methods.py", line 121, in request
return self.request_encode_body(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/_request_methods.py", line 196, in request_encode_body
extra_kw: dict[str, typing.Any] = {"headers": HTTPHeaderDict(headers)}
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/_collections.py", line 252, in __init__
self.extend(headers)
File "/usr/local/lib/python3.11/site-packages/urllib3/_collections.py", line 370, in extend
for key, value in other:
^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
After some debugging, the issue is due to the RPYC's custom type (iterable tuple) is not really supporting the unpacking with the following syntax
We are using the following combination (rpyc+openapi+urllib3) for processing REST requests and ran into this error.
After some debugging, the issue is due to the RPYC's custom type (iterable tuple) is not really supporting the unpacking with the following syntax
for key, value in other:
which is causing the error "Too many values to unpack" where the iterable tuple can be unpacked with single item.
You can check the urllib3 source code for this part here: https://github.com/urllib3/urllib3/blob/main/src/urllib3/_collections.py#L355
Would you be possible to resolve this issue?
The text was updated successfully, but these errors were encountered: