JSON RPC 2.0 Named Parameters

253 views
Skip to first unread message

Nicholas Laveur

unread,
Mar 31, 2011, 11:07:28 AM3/31/11
to JSONRPClib (Python)
It appears that Named parameters are not working at all in the current
version of the code (0.1.3). I keep getting an error back:
>>> server = jsonrpclib.Server('http://localhost:8080');
>>> server.add(5,10)
15
>>> server.add(x=5,y=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.6-universal/egg/jsonrpclib/jsonrpc.py",
line 276, in __call__
File "build/bdist.macosx-10.6-universal/egg/jsonrpclib/jsonrpc.py",
line 225, in _request
File "build/bdist.macosx-10.6-universal/egg/jsonrpclib/jsonrpc.py",
line 529, in check_for_errors
jsonrpclib.jsonrpc.ProtocolError: (-32602, u'Invalid parameters.')


But according to the github this should work.

Any ideas whats going on, and possibly when we might expect a fix?

Nicholas Laveur

unread,
Mar 31, 2011, 12:38:21 PM3/31/11
to JSONRPClib (Python)
I found the issue in 2.6.0 -> 2.6.5 Python doesn't support unicode
keyword names in **params

This has fixed in 2.6.6 but it seems apple is still at 2.6.1

Josh Marshall

unread,
Mar 31, 2011, 1:17:46 PM3/31/11
to jsonr...@googlegroups.com
Thanks for bringing this up! I will definitely check this out on my snow leopard machine tonight.

Josh Marshall
Reply all
Reply to author
Forward
0 new messages