• DepthAI-v2
  • 'depthai.DeviceInfo' object has no attribute 'name'

Before requesting support, please see: https://docs.luxonis.com/en/latest/pages/support/

Hello,
I'm not sure exactly how this happened.
Execute utility device manger in deptha-python, and search is found in select Device, but there is nothing inside, and terminal and pop-up window

terminal output
"Exception in /depthai-python/utilities/device_manager.py, line 830; 'depthai.DeviceInfo' object has no attribute 'name' `

I also tried factory reset in Danger Zone, but same result.
Of course, the camera doesn't work.
Is it a firmware error?
How should I do the solution?

  • jakaskerl replied to this.
  • Hi yeo
    Do a python3 -m pip install depthai==2.22.0. You should be fine.

    Thanks,
    Jaka

    Hi yeo
    You probably have an outdated version of the depthai-python repo. You will need to update it to the latest ver. Let me know if this is the case here.

    Thanks,
    Jaka

    • yeo replied to this.

      jakaskerl
      I did a depthai-python git clone yesterday.

      And when running the example code, I can't even hear a "Click?" sound

        yeo Ok, the repo should be up to date then. What about the depthai version? Do a pip3 show depthai.

        Thanks,
        Jaka

        • yeo replied to this.

          jakaskerl

          Name: depthai
          Version: 2.17.2.0

          How can I re-update the camera firmware when it is broken?

            Hi yeo
            Do a python3 -m pip install depthai==2.22.0. You should be fine.

            Thanks,
            Jaka

            • yeo replied to this.
              jakaskerl changed the title to 'depthai.DeviceInfo' object has no attribute 'name' .
              10 months later

              I would be curious to know how this got resolved.

              I use depth Version: 2.22.0.0, but I get the following error:

              Connected cameras: [{socket: CAM_A, sensorName: IMX214, width: 4208, height: 3120, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 1, name: color}, {socket: CAM_B, sensorName: OV7251, width: 640, height: 480, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, name: left}, {socket: CAM_C, sensorName: OV7251, width: 640, height: 480, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, name: right}]

              Usb speed: HIGH

              Traceback (most recent call last):

                File "ColorCamera/rgb_preview.py", line 33, in <module>

                  print('Device name:', device.getDeviceName(), ' Product name:', device.getProductName())

              AttributeError: 'depthai.Device' object has no attribute 'getProductName'

              I tried running python3 -mpip install depthai -U but the terminal eventually stops with the following error: ERROR: Failed building wheel for depthai

              I am running out of ideas 🙁

                Hi srecouvreur
                It's not a depthai issue, but EEPROM one. The device has been flashed some time ago and doesn't have the product field (you can check that with Eeprom reader script).
                Just remove the getProductName() call from inside the script and it should work.

                Thanks,
                Jaka

                Okay, interestingly the code I was using from the Github repo (below) doesn't have that getProductName() call, despite showing as an error in the log

                #!/usr/bin/env python3

                import cv2import depthai as dai
                # Create pipelinepipeline = dai.Pipeline()
                # Define source and outputcamRgb = pipeline.create(dai.node.ColorCamera)xoutVideo = pipeline.create(dai.node.XLinkOut)
                xoutVideo.setStreamName("video")
                # PropertiescamRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)camRgb.setVideoSize(1920, 1080)
                xoutVideo.input.setBlocking(False)xoutVideo.input.setQueueSize(1)
                # LinkingcamRgb.video.link(xoutVideo.input)
                # Connect to device and start pipelinewith dai.Device(pipeline) as device:
                video = device.getOutputQueue(name="video", maxSize=1, blocking=False)
                while True: videoIn = video.get()
                # Get BGR frame from NV12 encoded video frame to show with opencv # Visualizing the frame on slower hosts might have overhead cv2.imshow("video", videoIn.getCvFrame())
                if cv2.waitKey(1) == ord('q'): break

                But implementing the older documentation code instead and commenting out line 33 (with that specific call)… it works!

                Is it possible that the current (new) code in the repository is erroneous?

                  jakaskerl

                  Ah sorry I got mixed up between the different examples I was trying to run - all good 🙂