Closed Bboy486 closed 2 years ago
Update: I reinstalled and still get the issue
You selected groupid 4 Press return to stopException in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, *self._kwargs) File "./harmonize.py", line 226, in averageimage coords[0] = ((coords[0])+1) w//2 #Translates x value and resizes to video aspect ratio NameError: name 'w' is not defined
Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "./harmonize.py", line 309, in buffer_to_light for i in rgb_bytes: NameError: name 'rgb_bytes' is not defined
[ WARN:0] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (1782) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Cannot identify device '/dev/video0'. [ WARN:0] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (909) open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ WARN:0] global /home/pi/opencv/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
Hey, it looks like you have a similar issue to me. Mission failed. Did you ever get around it?
It appears this error was caused in part by an obsolete installation procedure using setup.sh. Thus this issue can be closed.
Following up from https://github.com/MCPCapital/HarmonizeProject/issues/7#issue-705159787
In the instructions, there are some missing steps. change cd harmonizeproject to cd HarmonizeProject after sudo ./setup.sh you will need to give executable rights to ./harmonize.py run - ls -la If there is an X missing from harmonize.py then run the following: sudo chmod +x harmonize.py
If you run ls -la, you'll see the file is now executable
now run sudo ./harmonize.py
I was looking at the trace and noticed a lot of corrupt jpeg data
LAstly, when I try to re-run the .py I get this error
sudo ./harmonize.py I will use the bridge at 192.168.1.7 Hue bridge not found. Mission failed, better luck next time pi@raspberrypi:~/HarmonizeProject $
WHEN IT DOES RUN I GOT THIS ERROR
You selected groupid 4 VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV Unable to stop the stream: Device or resource busy Press return to stopException in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, *self._kwargs) File "./harmonize.py", line 226, in averageimage coords[0] = ((coords[0])+1) w//2 #Translates x value and resizes to video aspect ratio NameError: name 'w' is not defined
Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "./harmonize.py", line 309, in buffer_to_light for i in rgb_bytes: NameError: name 'rgb_bytes' is not defined