I have been using CVBpy on another computer since last summer without any problem. I have tried to replicate the setup on a new computer for a new project and it seems that the stream object does not have its usual associated methods, e.g. start() or get_snapshot().
I have installed CVB version 13.04.001 and then pip-installed the cvb python package v.1.4 from the wheel provided in Lib/Python. Everything works fine for the install and I can do pip import cvb without any error in a python console.
However when I try to call the methods of the stream, they dont seem to exist. For example:
stream.start()
raises an AttributeError: ābuiltin_function_or_methodā object has no attribute āstartā. Same for get_snapshot() etc. When I do dir(stream), I donāt see any public methods.
Indeed, this works, thank you very much! At which version of cvb did the change occur? And any idea why? I could not figure out how to get the documentation for several versions of cvbpy ā¦
Not sure about which versionā¦but I was as surprised as youā¦after this summer my code didnāt work and I was lucky to find the solution pretty fast. The product is great but the Python documentation is terribleš. I donāt think there are many Python developers using the SDK? Correct if Iām wrongā¦
sorry you ran into that change. We hand to change device.stream to device.stream() staring at version 13.04.000 because we want support multi stream devices and different kind of streams. So device.stream() can now take arguments.
Thank you for your feedback regarding the documentation. We are aware of this and will improve it step by step. We definitely want to give python developers a good user experience. FYI beginning with version 13.04.000 we also started to provide a stubfile to enable type hints. E.g. VS Code with Pylance should therefore highlight the change.
Be aware that
stream().start()
can dangerous, as the stream is automatically stopped when it is destroyed. In the above spinet it is not clear if stream is kreppt alive.
pretty sure Andreas was referencing cameras, that offer their data via multiple streams. I.e. for example a 3D camera, which offers 1 stream for itās depth data/point cloud and 1 stream which offers the confidence data. But which cameras offer multiple streams is not tied to 3D, this could be anything.
If you need the same stream in multiple processes, that can be solved via multicast for example.