Since some days I’m trying to get brickpi_web_server.py operable. The following error
is difficult to resolve.
I did the following advices from the internet:
1- Followed the Dexter video streaming robot page instruction.
2. solved some errors, installed " tornado"
3. Due to further errors followed the forumpage " Brickpi web video streaming"
4. did bash browser_steam_setup.sh for a general update.
5. Have a Raspi b+ and a Brickpi + and Picamera as hardware.
6. Have brickpi_scratch and Brickpi_browser_bot and the camera operable, so hardware is OK.
The next final error is preventing the start of the server.
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
sockjs.tornado will use json module
Traceback (most recent call last):
/browserStreamingRobot/brickpi_web_server.py", line 214, in <module>
ConnectionHandler, '/robot_control' )
line 109, in __init__self.io_loop)
TypeError: __init__() takes exactly 3 arguments (4 given)
Can you help me to resolve the error?
Thanks, Ton O
Kudos for actually searching for the answer to errors! And welcome to my life of nothing working.
On the weekend or potentially before I’ll try to get time to see if I can replicate your errors.
Meanwhile I see if I can help at all.
Though first I’m little confused at the code you copied.
Was it how you copied the “code”? Because all I see is outputs without outputs with no python commands invoked. Sorry, just a little confused.
Thanks for the reply. The error “code” was the result of starting the python program “brickpi_web_server.py”
Somewhat desperate I made a “total” Dexter update yesterday evening but this morning the same result. In the previous copy you can see the starting of:
-try to start the web server with ./www
-than the error comes up.
Hope this clarifies somewhat.
dumb question, did you run it with sudo as in
sudo python brickpi_web_server.py
Line 214 Tornado tries to bind to the port and start the listener. If you’re trying to start on port 80, you have to run with sudo. Otherwise linux won’t allow you to bind to the port.
In this IT world there are no dumb questions it can help to rethink things. And I need those triggers. Anyway I tried it again and it makes no difference, same error. Where ( in which code part) can I verify the port setting?
Thanks for the reaction.
Today tested the software on a second Raspi with the same bad results. Did update for tornado ( was the same no results) Also update on sockjs.tornado, tried verion 1,01, 1,02,1.93 (= latest) no improvement. Noticed on the Dexter forum a lot of complains about this software since 2015 also for Gopigo’s (which use nearly the same software). No proper advice is found in these forums as a solution. Also cheched the site of the original owner of the software bitbucket.org, their software looks simulair of the Dexter ones.
As far I can see is the problem that brickpi-web-server.py goes with 4 variables to
program router.py while there is only room for 3 variables. Can’t figure out which ones that are and what is their content.
So can someone help me on this and or is there sombody who have a working brickpi_web_server system running. ( or with a Gopigo)
the line that sets the port is 237
http_server.listen( 80 )
I did the original port of the project from Dexter’s GoPiGo examples. I’ll try to take a look later this week. Looks like the latest version has different number of parameters it expects. Sadly that’s one of the biggest annoyances of python. In other languages like Java, you have nice IDE that tells you exactly what parameters it expects. With python the default editor sucks and doesn’t offer code completion or even a good debugger.
I think I found the solution. After a lot of searching I installed tornado 4.4.2 dated: 30-9-2016. That enabled me to start the web server. It is ashamed that nowhere in the dexter info (e.g. in code heading) and answer on the forum this is mentioned. From what I saw on the internet a lot of troubles are experienced around this subject. It has costed me about a week to achieve this result.
After some successful server streaming moments I had to reset the Pi. At the new startup a new inlog screen appeared with DEX in the top asking for loginnaam and password. the following names are not accepted: Pi and robots1234, dex and robots1234, pi and raspberry.
Do somebody knows how to deal with that?
I can login through SSH and winSCP but no graphic HDMI interface.
Caps lock on? Dumb questions but I’ve fell for it many times.