[solved] My GoPiGo3 doesn't work with Browser_Streaming_Robot.py

My GoPiGo3 doesn’t work with Browser_Streaming_Robot.py.

I am trying to access the camera stream from internet. but error occurs:

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
/home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/www
Starting web server...
Uncaught exception GET / (192.168.1.5)
HTTPServerRequest(protocol='http', host='192.168.1.18:98', method='GET', uri='/', version='HTTP/1.1', remote_ip='192.168.1.5', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Host': '192.168.1.18:98', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1509, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/pi/Desktop/wj/Browser_Streaming_Robot/robot_web_server.py", line 191, in get
    self.render( webPath + "/index.html" )
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 724, in render
    html = self.render_string(template_name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 862, in render_string
    t = loader.load(template_name)
  File "/usr/local/lib/python2.7/dist-packages/tornado/template.py", line 427, in load
    self.templates[name] = self._create_template(name)
  File "/usr/local/lib/python2.7/dist-packages/tornado/template.py", line 454, in _create_template
    with open(path, "rb") as f:
IOError: [Errno 2] No such file or directory: '/home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/www/index.html'
500 GET / (192.168.1.5) 62.39ms
Uncaught exception GET / (192.168.1.5)
HTTPServerRequest(protocol='http', host='192.168.1.18:98', method='GET', uri='/', version='HTTP/1.1', remote_ip='192.168.1.5', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Host': '192.168.1.18:98', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1509, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/pi/Desktop/wj/Browser_Streaming_Robot/robot_web_server.py", line 191, in get
    self.render( webPath + "/index.html" )
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 724, in render
    html = self.render_string(template_name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 862, in render_string
    t = loader.load(template_name)
  File "/usr/local/lib/python2.7/dist-packages/tornado/template.py", line 427, in load
    self.templates[name] = self._create_template(name)
  File "/usr/local/lib/python2.7/dist-packages/tornado/template.py", line 454, in _create_template
    with open(path, "rb") as f:
IOError: [Errno 2] No such file or directory: '/home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/www/index.html'
500 GET / (192.168.1.5) 26.86ms

Hello @junwan2000
This particular project is meant for the GoPiGo2. We will eventually have an equivalent one for the GoPiGo3 but it is not available yet.

The error above seems to imply the setup file didn’t get executed. You will find it here:
/home/pi/Dexter/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/browser_stream_setup.sh

Hi cleoqc,

Thanks for your quick reply! Actually I am organizing a STEAM competition for youth at Los Angles(CA, USA) area.
We plan to use GoPiGo3 as one of our intelligent robot competition. We need watching streaming through online function on GoPiGo3. The code of Browser_Streaming_Robot.py doesn’t work with GoPiGo3 is really a show stopper.
When the GoPiGo3 verion of code can be available? Thanks!

Hello @junwan2000
I’m not the one developing that project but I believe it’s a question of a couple of weeks, maybe less. It’s definitely being worked on,

Cleo

Hi Cleo,

Can you help to communicate to the development team? And we need this project ASAP.

Thanks!
Jason

Hello @junwan2000,

Not on a Sunday, though :wink:

Someone will jump in on Monday or Tuesday.

That said, did you run this script to install the browser streaming project? You should be getting a different error message than the one you’re getting.
sudo bash /home/pi/Dex/ter/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/browser_stream_setup.sh

I am sure I did that script before and still got error. Thank you! And quick fix for this problem is really appreciated.
Jason

Hi @junwan2000,

We’ve been working on remote controlling a GoPiGo3 with a mobile device or a laptop for the past week.
We have something that works really nicely.

At the moment, we are testing it, to be sure nothing was missed out.
By tomorrow or the other following day, we should have something in our repository.

I’ll personally notify you when we got something.

Thank you!

Hi Robert,

Great and thanks for this good news!

I and my team really love the support of Dexter Industries!
Jason

1 Like

Hi Robert,

Is there any updates?

Thanks,
Jason

Hi @junwan2000,

The PR is still waiting to be approved.
As far as the project goes, it’s already finished.
It’s just that our team needs to check it.


I can give you a link to my repo that has this project:

After this PR gets accepted, the project will be found at the following address:

Please read the README.md file thoroughly and tell us if it works for you.


Here’s this project in action:


Thank you!

Hi Robert,

Thanks a lot!

I will try it this weekend and let you know,
Jason