broker
broker copied to clipboard
Python bindings error when trying to use the timeout version of `StatusSubscriber.get()`
Running this ...
import broker
with broker.Endpoint() as ep, ep.make_status_subscriber(True) as ss:
st = ss.get(1.0)
... triggers this:
Traceback (most recent call last):
File "/home/christian/t5/test.py", line 4, in <module>
st = ss.get(1.0)
File "/home/christian/inst/opt/zeek/lib64/zeek/python/broker/__init__.py", line 210, in get
x = self._subscriber.get(*args, **kwargs)
TypeError: Unable to convert function return value to a Python type! The signature was
(self: broker._broker.StatusSubscriber, arg0: float) -> std::optional<std::variant<broker::none, broker::error, broker::status> >
Did you forget to `#include <pybind11/stl.h>`? Or <pybind11/complex.h>,
<pybind11/functional.h>, <pybind11/chrono.h>, etc. Some automatic
conversions are optional and require extra headers to be included
when compiling your pybind11 module.
Just based on pattern-maching I'm guessing that this should look more like this.
(Not a blocker for Zeek 5!)