bjsonrpc icon indicating copy to clipboard operation
bjsonrpc copied to clipboard

remote objects not working in example1-server.py

Open umeboshi2 opened this issue 12 years ago • 0 comments

(bjsonrpc)]0;umeboshi@bard: ~/workspace/others/bjsonrpcumeboshi@bard:~/workspace/others/bjsonrpc$ python setup.py install
running install
running build
running build_py
running install_lib
running install_egg_info
Removing /freespace/home/umeboshi/.virtualenvs/bjsonrpc/lib/python2.7/site-packages/bjsonrpc-0.2.1-py2.7.egg-info
Writing /freespace/home/umeboshi/.virtualenvs/bjsonrpc/lib/python2.7/site-packages/bjsonrpc-0.2.1-py2.7.egg-info
(bjsonrpc)]0;umeboshi@bard: ~/workspace/others/bjsonrpcumeboshi@bard:~/workspace/others/bjsonrpc$ python examples/example1-server.py &
[1] 18881
(bjsonrpc)]0;umeboshi@bard: ~/workspace/others/bjsonrpcumeboshi@bard:~/workspace/others/bjsonrpc$ ()
{'domain': 'yourdomain-dot-com'}
Hello world

(bjsonrpc)]0;umeboshi@bard: ~/workspace/others/bjsonrpcumeboshi@bard:~/workspace/others/bjsonrpc$ python
Python 2.7.3 (default, Jan  2 2013, 16:53:07) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bjsonrpc
>>> c = bjsonrpc.connect()
()
{'domain': 'yourdomain-dot-com'}
>>> c.call.echo('hi')
hi
u'hi'
>>> l = c.call.newList()
>>> l
<bjsonrpc.connection.RemoteObject object at 0x9d2914c>
>>> l.call.items()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bjsonrpc/proxies.py", line 45, in function
    return self._conn.proxy(self.sync_type, name, args, kwargs)
  File "bjsonrpc/connection.py", line 670, in proxy
    return req.value
  File "bjsonrpc/request.py", line 188, in value
    raise ServerError(err)
bjsonrpc.exceptions.ServerError: Unknown method 'mylist_0001.items'
>>> 
^C
(bjsonrpc)]0;umeboshi@bard: ~/workspace/others/bjsonrpcumeboshi@bard:~/workspace/others/bjsonrpc$ exit

umeboshi2 avatar Mar 27 '13 19:03 umeboshi2