Re: [capnproto] PosixPath error when loading schema

2021-06-01 Thread Kyle Downey
Yep that was it. Casting via str() did the trick. On Tue, Jun 1, 2021 at 10:41 AM Kenton Varda wrote: > Hi Kyle, > > I think you need to convert `capnp_path` back into a string before passing > it to `capnp.load()`. Currently it appears you are passing a `Path` object > that you constructed

Re: [capnproto] PosixPath error when loading schema

2021-06-01 Thread 'Kenton Varda' via Cap'n Proto
Hi Kyle, I think you need to convert `capnp_path` back into a string before passing it to `capnp.load()`. Currently it appears you are passing a `Path` object that you constructed using pathlib, but `capnp.load` doesn't know how to deal with those, it wants a plain string. -Kenton On Tue, Jun

[capnproto] PosixPath error when loading schema

2021-06-01 Thread Kyle Downey
I have the following simple schema: @0x8fe87a03768154e9; enum Side { buy @0; sell @1; } struct TradeMessage { time @0 : Float64; tradeId @1 : Int64; side @2 : Side; size @3 : Float64; price @4 : Float64; } struct Level1BookUpdateMessage { time @0 : Float64; best_bid_qty @1 : Float64;