On Sunday, July 28, 2013 3:17:55 PM UTC-5, zodman wrote: > > El 26/07/2013 07:42 p.m., Jose Patricio Villarerreal escribió: > > Estoy tratando de hacer una llamada por medio de JSONRPC y trate > > siguiendo el ejemplo de: > > > > > http://code.google.com/p/tryton/wiki/CodeSnippets#tryton_jsonrpc_client_for_create_a_database > > > > > y de: > > http://code.google.com/p/tryton/wiki/RemoteCalls > > > > Pero no me sale, que traigo mal? > > > > Aquí esta lo que estoy haciendo... > > from jsonrpclib import Server as ServerProxy > > import jsonrpclib > > import json > > import pprint > > > > > > PASSWORD = 'admin' > > USER = 'admin' > > > > > > > > s = ServerProxy ('http://%s:%s@localhost:8000/tst' % (USER, PASSWORD)) > > > > cnxt = s.model.res.user.get_preferences(True, {}) > > > > y me marca esto: > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "/usr/local/lib/python2.6/dist-packages/jsonrpclib/jsonrpc.py", > > line 218, in __call__ > > return self.__send(self.__name, args) > > File "/usr/local/lib/python2.6/dist-packages/jsonrpclib/jsonrpc.py", > > line 169, in _request > > check_for_errors(response) > > File "/usr/local/lib/python2.6/dist-packages/jsonrpclib/jsonrpc.py", > > line 476, in check_for_errors > > code = result['error']['code'] > > TypeError: list indices must be integers, not str > > > > > > Algún Tip??? > > > > Saludos, > > Jose Patricio V. > > > > > > > > > Si conoces que existe proteus, que es un cliente python para tryton > http://hg.tryton.org/proteus >
No sabía que era para eso... Esta excelente... MUCHAS GRACAIS...!!!
