aio-libs/aiozmq

RPC example doesn't work

aknuds1 opened this issue · 0 comments

The RPC example in the docs doesn't work. For one, it misses import asyncio, but even after rectifying this the example fails like so:

✗ ./docker/templates/sync-with-github.py
Traceback (most recent call last):
  File "./docker/templates/sync-with-github.py", line 24, in <module>
    asyncio.get_event_loop().run_until_complete(go())
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 337, in run_until_complete
    return future.result()
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "./docker/templates/sync-with-github.py", line 18, in go
    ret = yield from client.rpc.remote_func(1, 2)
AttributeError: 'RPCClient' object has no attribute 'rpc'

I have a PR for this issue, even though it's incomplete.