• RAE
  • Creating App python package

Using RH, I created a test Perception App (using the + Create App button on Apps/Team Apps), and assigned it to rae. This creates a python class to present a live view. Just running this creates the error:

root@keembay:/app# python3 app.py
[2023-11-13 20:37:10.621] [depthai] [warning] USB protocol not available - If running in a container, make sure that the following is set: "-v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw'"
Traceback (most recent call last):
  File "/app/app.py", line 2, in <module>
    from robothub import LiveView, BaseApplication
ImportError: cannot import name 'LiveView' from 'robothub' (/lib/robothub/__init__.py)
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

the python package robothub is installed:

root@keembay:/app# python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import robothub
>>> from importlib.metadata import version
>>> version('robothub')
'2.2.0'

and

>>> from robothub import LiveView
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'LiveView' from 'robothub' (/lib/robothub/__init__.py)

Is there another robothub package to include?

Also - rae now has two perception apps (including this test app) - but the RAE-Default App keeps starting up. Is that RAE-Default App required and if not, can it be set to not auto start?

    2 months later

    mjohannessen

    Hello and sorry for a late reply,

    the issue you are encountering is likely because you used our "Regular" template rather than a "RAE" specific one

    For the application to work on RAE - you must choose "RAE Starter" here.

    As for having multiple apps - you can simply uninstall the RAE Default app, it will be available for installation later if you decide to have it again. In case you decide to leave it installed but stopped - the trigger to start the application again is opening its front end.

    Let me know if this answers all your questions.