Skip to content

Strange interactive behaviour #6

@mortlind

Description

@mortlind

When trying to go through the code lines in examples/cloud.py line by line in an interactive interpreter, an exception occurs when trying to create a depth stream:

>>> device = cyni.getAnyDevice()
>>> device.open()
>>> depthStream = device.createStream(b"depth", fps=30)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cyni.pyx", line 117, in cyni.Device.createStream (cyni.cpp:4232)
  File "cyni.pyx", line 35, in cyni.error (cyni.cpp:2748)
cyni.OpenNIException: Must open() the device before creating any streams.
>>> 

This can be remedied by executing the two lines where the device is gotten and the one where it is opened in one. (The USB events thread priority warning have no impact at the moment, and I tolerate it for the time being. The important fact is that I get a usable VideoStream object (depthStream)):

>>> device = cyni.getAnyDevice(); device.open()
Warning: USB events thread - failed to set priority. This might cause loss of data...
>>> depthStream = device.createStream(b"depth", fps=30)
>>> 

Can someone please explain what this is about?

P.S.: Running Python 3.5.2 on Debian GNU/Linux. The particular fork I use currently is mortlind/cyni.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions