View: 129|Reply: 0

Issues with starting webServer.py

[Copy link]

1

Threads

1

Posts

5

Credits

Newbie

Rank: 1

Credits
5
Post time 2024-9-29 09:22:57 | Show all posts |Read mode
Hello,

I have a Pi Car Pro and I am doing the initial setup of the Raspberry Pi, the HAT board, the camera and servos, but I cannot launch the web server. I also cannot connect to the Pi wifi I set.

Here is the errors I'm getting:


root@raspberrypi1:/home/admin/adeept_picarpro/server# python webServer.py
......................pause..........................
mpu6050 disconnected, ARM MODE ON
......................pause..........................
Starting camera thread.
[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (1824) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Cannot identify device '/dev/video-1'.
[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (914) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/admin/adeept_picarpro/server/base_camera.py", line 94, in _thread
    for frame in frames_iterator:
  File "/home/admin/adeept_picarpro/server/camera_opencv.py", line 435, in frames
    if ImgIsNone == 0:
UnboundLocalError: local variable 'ImgIsNone' referenced before assignment
^CTraceback (most recent call last):
  File "/home/admin/adeept_picarpro/server/webServer.py", line 26, in <module>
    import app
  File "/home/admin/adeept_picarpro/server/app.py", line 16, in <module>
    camera = Camera()
  File "/home/admin/adeept_picarpro/server/camera_opencv.py", line 363, in __init__
    super(Camera, self).__init__()
  File "/home/admin/adeept_picarpro/server/base_camera.py", line 71, in __init__
    while self.get_frame() is None:
  File "/home/admin/adeept_picarpro/server/base_camera.py", line 79, in get_frame
    BaseCamera.event.wait()
  File "/home/admin/adeept_picarpro/server/base_camera.py", line 28, in wait
    return self.events[ident][0].wait()
  File "/usr/lib/python3.9/threading.py", line 574, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib/python3.9/threading.py", line 312, in wait
    waiter.acquire()
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 1428, in _shutdown
    lock.acquire()
KeyboardInterrupt:



Thanks
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules