Problem, camera does not display
Forums:
Good morning all.
I followed this tutorial to be able to control the robot via a web browser.
https://www.piborg.org/blog/yetiborg-v2-examples-web-ui
Everything works except the webcam display, here is a screen of my page:
https://i.imgur.com/EzAAVq2.png
Do you know where it comes from?
thank you
pi@raspberrypi:~/yetiborgv2 $ sudo ./yeti2Web.py
Loading ZeroBorg on bus 1, address 40
Found ZeroBorg at 40
ZeroBorg loaded on bus 1
Setup camera
Setup the stream processing thread
Wait ...
Start the stream using the video port
Setup the watchdog
Traceback (most recent call last):
File "./yeti2Web.py", line 376, in
httpServer = SocketServer.TCPServer(("0.0.0.0", webPort), WebServer)
File "/usr/lib/python2.7/SocketServer.py", line 420, in __init__
/usr/lib/python2.7/dist-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 240x180 to 240x192
width, height, fwidth, fheight)))
self.server_bind()
File "/usr/lib/python2.7/SocketServer.py", line 434, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
piborg
Thu, 03/12/2020 - 15:27
Permalink
Wrong error
Unfortunately the error message you have shown is related to the network connection and would prevent the page loading at all - in other words it is not to do with the problem you are seeing :(
That error is usually caused by either running two copies of the script at the same time, or trying to start the script again too soon after it had been stopped.
Try rebooting the Raspberry Pi and running the script again - you should get a different error message if the script is having problems with the camera. If you have set the script to run at startup you will need to remove that first.
Free-Wolf
Thu, 03/12/2020 - 15:35
Permalink
I don't really understand what's going on ...
I don't really understand what's going on ...
piborg
Thu, 03/12/2020 - 16:34
Permalink
Script bug
This is a problem with the script, but it is easy to fix :)
Open yeti2Web.py in an editor and look for the line:
and change it to:
Next look for the line:
and change it to:
Save the script and try it again.
Free-Wolf
Thu, 03/12/2020 - 17:14
Permalink
Thank you
Thank you very much for your help Piborg.
Now I have another error message here ^^
piborg
Thu, 03/12/2020 - 17:45
Permalink
Camera busy
This one is a little harder to understand, but easier to sort out.
The actual error is the
mmal
lines towards the top:What they mean is that the camera is already in use. In this case it is because the previous run of the script did not turn the camera off properly because of the error.
To fix the problem simply restart the Raspberry Pi :)
Free-Wolf
Thu, 03/12/2020 - 17:50
Permalink
:D
A big thank you to you Piborg! It works !
Very good evening to you: D !!!!
Free-Wolf
Fri, 03/13/2020 - 12:59
Permalink
Problem
Hello,
It's me again.
I formatted my raspberry and installed RASPAP to have a wifi hotspot.
Maybe the problem comes from there? Here is the error code:
pi@raspberrypi:~/yetiborgv2 $ sudo ./yeti2Web.py
Loading ZeroBorg on bus 1, address 40
Found ZeroBorg at 40
ZeroBorg loaded on bus 1
Setup camera
Setup the stream processing thread
Wait ...
Start the stream using the video port
Setup the watchdog
Traceback (most recent call last):
File "./yeti2Web.py", line 376, in
httpServer = SocketServer.TCPServer(("0.0.0.0", webPort), WebServer)
File "/usr/lib/python2.7/SocketServer.py", line 420, in __init__
self.server_bind()
File "/usr/lib/python2.7/SocketServer.py", line 434, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
/usr/lib/python2.7/dist-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 240x180 to 240x192
width, height, fwidth, fheight)))
piborg
Fri, 03/13/2020 - 15:21
Permalink
Port in use
I suspect that the RASPAP software uses port 80 as well, meaning the Web UI cannot use port 80.
In the script look for this line:
and change the number to something else, such as
1000
.The script should now run, but you will need to change the address in your web browser to include the port number. For example
http://192.168.0.198:1000
Free-Wolf
Sat, 03/14/2020 - 10:50
Permalink
pb
It's all good, I deleted the script, I have already downloaded again and made the appropriate modifications, everything works. Thanks again!
piborg
Sat, 03/14/2020 - 12:52
Permalink
Great news
Glad to hear you got everything working :)