easyrpc
easyrpc copied to clipboard
EasyRpcServer non iterable return types failing
Description
Found in easyjobs, data of only type int sent between RPC endpoints fails with the following exception:
Traceback (most recent call last):
File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable
07-22 10:31 EasyRpc-server /ws/jobs ERROR error during server_request
Traceback (most recent call last):
File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable
Solution:
Check if result is iterable by inspecting for 'contains' attribute, allowing for inspection of 'GENERATOR_START' for generator detectoin
- [ ] - Mirror Proxy implementation of iterable detection
- [ ] - Create Unit tests to ensure values can be transported