capnproto / pycapnp

Cap'n Proto serialization/RPC system - Python bindings
BSD 2-Clause "Simplified" License
468 stars 124 forks source link

`capnp.AsyncIoStream` does not exist #326

Open lenianiva opened 1 year ago

lenianiva commented 1 year ago

I have

>>> capnp.__version__
'1.3.0'

There is no capnp.AsyncIoStream as shown in calculator client example:

>>> capnp.AsyncIoStream
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'capnp' has no attribute 'AsyncIoStream'. Did you mean: 'PyAsyncIoStream'?

Without this stream object, is there another way to write the async client?

lenianiva commented 1 year ago

The documentation says we can just pass in a raw string: http://capnproto.github.io/pycapnp/capnp.html

tobiasah commented 1 year ago

Hey

I think the problem is that the documentation points to the master branch of this github repo. The latest master changes do change things quite a lot and are not compatible with the latest release on pypi. (Your error message seconds this as far as I can tell)

I would try running the examples from an older version, from the time of the last release. https://github.com/capnproto/pycapnp/tree/5061cdd1eed5985eefb92c5843c0be3a8b061e0b

OR

Installing the latest master version (which requires a c++ compiler)

(there is also a branch 1.0.x but it does not seem to be up to date with the last official release.)

Let me know if this fixes things for you.