monkeymademe / picamera2-WebUI

This is a WebUI for the Picamera2 Library for the Raspberry Pi
MIT License
136 stars 17 forks source link

Picamera2-WebUI on RPI 4 with buster lite. KeyError: 'Num' #86

Closed Steve8910 closed 1 week ago

Steve8910 commented 1 week ago

Describe the bug 8 September 2024 Running picamera2-WebUI app.py causes a KeyError: 'Num'

To Reproduce Steps to reproduce the behavior:

  1. Clean install of RPI Buster lite on rpi 4 (headless device withe a Pi HQ Camera Installed);
  2. SSH on to the device;
  3. Update and upgrade using 'sudo apt-get update && sudo apt-get upgrade';
  4. Clone the picanera2-WebUi Software using 'git clone https://github.com/monkeymademe/picamera2-WebUI.git;
  5. cd into 'picamera2-WebUI' folder;
  6. Run the picamera2-WebUI python application with python3 app.py;
  7. See The Error

Expected behavior I Don't know it is the first time I have tried to run it. I expect it not to have an error

Screenshots The output of the display. /picamera2-WebUI $ python3 app.py [0:27:24.384876287] [7635] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f [0:27:24.414889205] [7636] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0 [0:27:24.414972000] [7636] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml' ~/picamera2-WebUI/static/camera_config

Detected Cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 0, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]

Camera Info: {'Model': 'imx477', 'Location': 2, 'Rotation': 0, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}

Traceback (most recent call last): File "~/picamera2-WebUI/app.py", line 506, in camera_num = camera_info['Num'] KeyError: 'Num'

end of output.

monkeymademe commented 1 week ago

Please refer to the readme requirements section

Raspberry Pi OS / Debian Please be aware that due to dependencies on newer versions of Picamera2 (see below) and Libcamera this project only works on Raspberry Pi OS Bookworm (or newer). Issues have been reported with older versions (e.g. Bullseye) not functioning due to libcamera no longer being updated on older versions of the Raspberry Pi OS. The recommendation, even on older Pi's, is to use Bookworm (or newer).