Diddy2Web.py camera not working

Diddy2Web.py camera not working. The motors work but an X is displayed where the picture is supposed to be on my mobile phone. There is nothing wrong with the connection as Raspistill works correctly when the Diddy2Web.py program is off.

piborg's picture

This seems to be a rare problem which we have seen once before: No Camera Picture.

In their case raspistill was working fine, but the script was not returning any image. It was fixed by updating their copy of Raspbian.

My first suggestion would be to try updating Raspbian with this command:

sudo apt full-upgrade

followed by a restart.

If that does not fix the problem then try this command:

sudo rpi-update

followed by a restart. This was the one that fixed things for the other person :)

All done as per your suggestion. Unfortunately it does not solve the problem. While the buttons in the Web UI works, the one buttons that does not work is the save picture button. When this is clicked, the error below comes out. Also streaming does not work.

pi@raspberrypi:~ $ cd diddyborgv2/
pi@raspberrypi:~/diddyborgv2 $ sudo python diddy2Web.py
Loading ThunderBorg on bus 1, address 15
Found ThunderBorg at 15
ThunderBorg loaded on bus 1
Setup camera
Setup the stream processing thread
Wait ...
Setup the watchdog
Start the stream using the video port
Press CTRL+C to terminate the web-server
Reconnected...
----------------------------------------
Exception happened during processing of request from ('192.168.0.30', 60210)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
self.handle()
File "diddy2Web.py", line 232, in handle
if captureFrame != None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

piborg's picture

This error is fairly easy to fix. There are a couple of places where the image is checked to see if it is None. These checks need to be changed from using != to using is not instead.

Change

if sendFrame != None:

to

if sendFrame is not None:

Change

if captureFrame != None:

to

if captureFrame is not None:

These changes should fix both the image stream and the save picture button.

Subscribe to Comments for "Diddy2Web.py camera not working"