Skip to content

bug: Message extra parameters are passed to init #116

@nicola-lunghi

Description

@nicola-lunghi

I have the following code:

async def my_func(): payload = '{"jsonrpc":"2.0","method":"connect", "arguments": ["wifi_c8df844b53ae_62756d626c656265652d323539373835_managed_psk"], "id":"aaaaaaqvjcYf5A0h"}' response = await jrpc_dispatch(payload.decode(), debug=True) @method async def connect(): # do something 

here I use wrongly "arguments" for the argument list

I got the exception

my_test[1101]: ERROR: Task exception was never retrieved my_test[1101]: future: <Task finished coro=<process_rpc_message() done, defined at /usr/lib/python3.7/site-packages/test_mqtt/mqttrpc.py:12> exception=TypeError("__init__() got an unexpected keyword argument 'arguments'")> [asyncio:default_exception_handler:1615] my_test[1101]: Traceback (most recent call last): my_test[1101]: File "/usr/lib/python3.7/site-packages/test_mqtt/mqttrpc.py", line 13, in process_rpc_message my_test[1101]: response = await jrpc_dispatch(payload.decode(), debug=True) my_test[1101]: File "/usr/lib/python3.7/site-packages/jsonrpcserver/async_dispatcher.py", line 101, in dispatch my_test[1101]: convert_camel_case=convert_camel_case, my_test[1101]: File "/usr/lib/python3.7/site-packages/jsonrpcserver/async_dispatcher.py", line 71, in dispatch_pure my_test[1101]: deserialized, context=context, convert_camel_case=convert_camel_case my_test[1101]: File "/usr/lib/python3.7/site-packages/jsonrpcserver/dispatcher.py", line 201, in create_requests my_test[1101]: return Request(context=context, convert_camel_case=convert_camel_case, **requests) my_test[1101]: TypeError: __init__() got an unexpected keyword argument 'arguments' 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions