# PiDog: How to troubleshoot "no cameras available"

**URL:** <https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [January 30, 2025, 11:08pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548 "2025-01-30T23:08:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianb](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/brianb/32/1304_2.png) [@brianb](https://forum.sunfounder.com/u/brianb)\
**Post date:** [January 30, 2025, 11:08pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/1 "2025-01-30T23:08:48Z")

</div>

Hello - Just built my PiDog and everything works great… except… the camera. I believe my camera is not being recognized. I’m not sure how to troubleshoot or resolve the issue.

From this [other similar post](https://forum.sunfounder.com/t/pidog-camera-appears-to-not-work-no-idea-how-to-test/1574/2) here is my info:

1.Raspberry Pi camera is properly connected and oriented correctly?  
I believe so. Pictures attached below

2.What version of the operating system are you currently using?  
Debian GNU/Linux 12 (bookworm)

3.Please run libcamera-hello to test if the camera is working  
This is what I get:

```auto
~/pidog/examples $ sudo libcamera-hello
[0:39:57.420566437] [2624] INFO Camera camera_manager.cpp:325 libcamera v0.3.2+99-1230f78d
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Made X/EGL preview window
ERROR: ***no cameras available***

```

4.When you run the example code, if there are any errors, please provide a complete screenshot of the error for us to analyze and resolve the issue.

```auto
~/pidog/examples $ sudo python3 7_face_track.py 
vilib 0.3.12 launching ...
picamera2 0.3.24
config_file: /home/brian/.config/pidog/pidog.conf
robot_hat init ... done
imu_sh3001 init ... done
rgb_strip init ... done
dual_touch init ... done
sound_direction init ... done
sound_effect init ... pinctrl set 20 op dh
done
ultrasonic init ... done
Imgshow start ...

Web display on:
Exception in thread vilib:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/dist-packages/vilib/vilib.py", line 235, in camera
    picam2 = Picamera2()
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 257, in __init__
    camera_num = self.global_camera_info()[camera_num]['Num']
                 ~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^
IndexError: list index out of range
      http://10.76.1.168:9000/mjpg

Starting web streaming ...
 * Serving Flask app 'vilib.vilib'
 * Debug mode: off
start
Stopping and returning to the initial position ... 0, 0 
Quit

```

Pics:

 ![IMG_9212](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/7/753b665de8797eb2db56d16e30a464f91d2d79a7.jpeg)

---

<div class="post-metadata">

**Author:** ![brianb](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/brianb/32/1304_2.png) [@brianb](https://forum.sunfounder.com/u/brianb)\
**Post date:** [January 30, 2025, 11:10pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/2 "2025-01-30T23:10:35Z")

</div>

![IMG_9210](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/3/39680aaaca64e8b3e4cbbe6d2452e81cd291aa4f.jpeg)

---

<div class="post-metadata">

**Author:** ![brianb](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/brianb/32/1304_2.png) [@brianb](https://forum.sunfounder.com/u/brianb)\
**Post date:** [January 30, 2025, 11:11pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/3 "2025-01-30T23:11:26Z")

</div>

![IMG_9211](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/e/ee5220fb202bd0452a7d44f99294932f5b34a20b.jpeg)

---

<div class="post-metadata">

**Author:** ![Weirdyguy](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@Weirdyguy](https://forum.sunfounder.com/u/Weirdyguy)\
**Post date:** [January 30, 2025, 11:31pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/4 "2025-01-30T23:31:04Z")

</div>

I’m not sure but I take a look to the tutorial video on YouTube and I think you install cable to camera upside-down. Look at the blue side need to face the black clip on rpi board and on camera board.

 ![Screenshot_20250130_182913_Chrome](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/3/396ef7d11ec75106b2670980fa58f87a3081e378.jpeg)  
 ![Screenshot_20250130_183150_Chrome](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/1/1b0355e42efd3b6610e1b387f99578a8d71d2bb1.jpeg)

---

<div class="post-metadata">

**Author:** ![brianb](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/brianb/32/1304_2.png) [@brianb](https://forum.sunfounder.com/u/brianb)\
**Post date:** [January 30, 2025, 11:44pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/5 "2025-01-30T23:44:37Z")

</div>

Hi @Weirdyguy - first, thanks for responding so quickly!  
Second, you are correct. I now switched the cable orientation into the camera (but not from the Raspberry Pi), and the camera is now recognized and works.  
Thanks!  
I was fooled by the instruction sheet, which shows NO twist to the cable as it runs from the RPi to the camera. But indeed it needs one twist to change orientation.  
Awesome, thank you!

---

<div class="post-metadata">

**Author:** ![Weirdyguy](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@Weirdyguy](https://forum.sunfounder.com/u/Weirdyguy)\
**Post date:** [January 30, 2025, 11:47pm UTC](https://forum.sunfounder.com/t/pidog-how-to-troubleshoot-no-cameras-available/2548/6 "2025-01-30T23:47:01Z")

</div>

I notice that the cable ending with 90° go connect to camera and the flat ending goes to rpi. If you take a look at the video tutorial.  
[https://docs.sunfounder.com/projects/pidog/en/latest/assemble\_video.html](https://docs.sunfounder.com/projects/pidog/en/latest/assemble_video.html)

Second video at 1:43 and third video at 10:30.

Have fun! 😉
