poppy-project / poppy-humanoid

Poppy Humanoid is an open-source and 3D printed humanoid robot. Optimized for research and education purposes, its modularity allows for a wide range of applications and experimentations.
662 stars 233 forks source link

Internal Server Error #39

Closed Zellerich closed 3 years ago

Zellerich commented 3 years ago

When you flash the SD and try to connect to the Webserver poppy.local there is an Internal Server Error.

Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I used the latest release and flashed three times.

ymollard commented 3 years ago

Which image are you using? Is your robot a full humanoid or just a torso?

Zellerich commented 3 years ago

The robot is full humanoid and I'm using the 3.0.0 release image.

ymollard commented 3 years ago

Could you connect through SSH and then get the logs? To do so, if you run Linux/OSX, open a system terminal and type ssh poppy@poppy.local with password poppy, or use PuTTY for Windows. Then run sudo journalctl -u puppet-master Then, identify where the portion of logs related about the HTTP Error 500 Internal Server Error and copy/paste it here.

SuperNiac commented 3 years ago

I have the same issue , here's the logs :

sudo journalctl -u puppet-master

-- Logs begin at Sat 2020-10-24 05:31:42 BST, end at Wed 2020-12-23 11:09:48 GMT. -- Dec 23 10:56:54 poppy systemd[1]: Started Puppet Master service. Dec 23 10:57:13 poppy python[597]: Serving Flask app "bouteillederouge" (lazy loading) Dec 23 10:57:13 poppy python[597]: Environment: production Dec 23 10:57:13 poppy python[597]: WARNING: This is a development server. Do not use it in a production deployment. Dec 23 10:57:13 poppy python[597]: Use a production WSGI server instead. Dec 23 10:57:13 poppy python[597]: Debug mode: off Dec 23 10:57:13 poppy python[597]: Running on http://0.0.0.0:2280/ (Press CTRL+C to quit) Dec 23 11:09:38 poppy python[597]: [2020-12-23 11:09:38,929] ERROR in app: Exception on / [GET] Dec 23 11:09:38 poppy python[597]: Traceback (most recent call last): Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Dec 23 11:09:38 poppy python[597]: response = self.full_dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.handle_user_exception(e) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Dec 23 11:09:38 poppy python[597]: reraise(exc_type, exc_value, tb) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise -- Logs begin at Sat 2020-10-24 05:31:42 BST, end at Wed 2020-12-23 11:09:48 GMT. -- Dec 23 10:56:54 poppy systemd[1]: Started Puppet Master service. Dec 23 10:57:13 poppy python[597]: Serving Flask app "bouteillederouge" (lazy loading) Dec 23 10:57:13 poppy python[597]: Environment: production Dec 23 10:57:13 poppy python[597]: WARNING: This is a development server. Do not use it in a production deployment. Dec 23 10:57:13 poppy python[597]: Use a production WSGI server instead. Dec 23 10:57:13 poppy python[597]: Debug mode: off Dec 23 10:57:13 poppy python[597]: Running on http://0.0.0.0:2280/ (Press CTRL+C to quit) Dec 23 11:09:38 poppy python[597]: [2020-12-23 11:09:38,929] ERROR in app: Exception on / [GET] Dec 23 11:09:38 poppy python[597]: Traceback (most recent call last): Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Dec 23 11:09:38 poppy python[597]: response = self.full_dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.handle_user_exception(e) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Dec 23 11:09:38 poppy python[597]: reraise(exc_type, exc_value, tb) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise -- Logs begin at Sat 2020-10-24 05:31:42 BST, end at Wed 2020-12-23 11:09:48 GMT. -- Dec 23 10:56:54 poppy systemd[1]: Started Puppet Master service. Dec 23 10:57:13 poppy python[597]: Serving Flask app "bouteillederouge" (lazy loading) Dec 23 10:57:13 poppy python[597]: Environment: production Dec 23 10:57:13 poppy python[597]: WARNING: This is a development server. Do not use it in a production deployment. Dec 23 10:57:13 poppy python[597]: Use a production WSGI server instead. Dec 23 10:57:13 poppy python[597]: Debug mode: off Dec 23 10:57:13 poppy python[597]: Running on http://0.0.0.0:2280/ (Press CTRL+C to quit) Dec 23 11:09:38 poppy python[597]: [2020-12-23 11:09:38,929] ERROR in app: Exception on / [GET] Dec 23 11:09:38 poppy python[597]: Traceback (most recent call last): Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Dec 23 11:09:38 poppy python[597]: response = self.full_dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.handle_user_exception(e) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Dec 23 11:09:38 poppy python[597]: reraise(exc_type, exc_value, tb) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Dec 23 11:09:38 poppy python[597]: raise value Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request Dec 23 11:09:38 poppy python[597]: return self.view_functionsrule.endpoint Dec 23 11:09:38 poppy python[597]: File "bouteillederouge.py", line 111, in index Dec 23 11:09:38 poppy python[597]: return render_template(pm.config.info.langage+'/opening.html', motors=pm._get_robot_motor_list()) lines 2-24/40 58% Dec 23 10:56:54 poppy systemd[1]: Started Puppet Master service. Dec 23 10:57:13 poppy python[597]: Serving Flask app "bouteillederouge" (lazy loading) Dec 23 10:57:13 poppy python[597]: Environment: production Dec 23 10:57:13 poppy python[597]: WARNING: This is a development server. Do not use it in a production deployment. Dec 23 10:57:13 poppy python[597]: Use a production WSGI server instead. Dec 23 10:57:13 poppy python[597]: Debug mode: off Dec 23 10:57:13 poppy python[597]: Running on http://0.0.0.0:2280/ (Press CTRL+C to quit) Dec 23 11:09:38 poppy python[597]: [2020-12-23 11:09:38,929] ERROR in app: Exception on / [GET] Dec 23 11:09:38 poppy python[597]: Traceback (most recent call last): Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Dec 23 11:09:38 poppy python[597]: response = self.full_dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.handle_user_exception(e) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Dec 23 11:09:38 poppy python[597]: reraise(exc_type, exc_value, tb) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Dec 23 11:09:38 poppy python[597]: raise value Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request Dec 23 11:09:38 poppy python[597]: rv = self.dispatch_request() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request Dec 23 11:09:38 poppy python[597]: return self.view_functionsrule.endpoint Dec 23 11:09:38 poppy python[597]: File "bouteillederouge.py", line 111, in index Dec 23 11:09:38 poppy python[597]: return render_template(pm.config.info.langage+'/opening.html', motors=pm._get_robot_motor_list()) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/dev/puppet-master/puppet_master.py", line 109, in _get_robot_motor_list Dec 23 11:09:38 poppy python[597]: return sorted(RobotCls.default_config['motors'].keys()) Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/pypot/creatures/abstractcreature.py", line 21, in get Dec 23 11:09:38 poppy python[597]: return self.fget.get(None, owner)() Dec 23 11:09:38 poppy python[597]: File "/home/poppy/pyenv/lib/python3.7/site-packages/pypot/creatures/abstractcreature.py", line 201, in default_config Dec 23 11:09:38 poppy python[597]: return json.load(f) Dec 23 11:09:38 poppy python[597]: File "/usr/lib/python3.7/json/init.py", line 296, in load Dec 23 11:09:38 poppy python[597]: parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) Dec 23 11:09:38 poppy python[597]: File "/usr/lib/python3.7/json/init.py", line 348, in loads Dec 23 11:09:38 poppy python[597]: return _default_decoder.decode(s) Dec 23 11:09:38 poppy python[597]: File "/usr/lib/python3.7/json/decoder.py", line 337, in decode Dec 23 11:09:38 poppy python[597]: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) Dec 23 11:09:38 poppy python[597]: File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode Dec 23 11:09:38 poppy python[597]: raise JSONDecodeError("Expecting value", s, err.value) from None Dec 23 11:09:38 poppy python[597]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Dec 23 11:09:38 poppy python[597]: 192.168.1.46 - - [23/Dec/2020 11:09:38] "GET / HTTP/1.1" 500 -

I'm also using humanoid and the latest 3.0 rasp image

ymollard commented 3 years ago

Generic exceptions happened and then the configuration file describing your robot have been corrupted. I suspect your SD card to be faulty. I would:

SuperNiac commented 3 years ago

Sadly I've already tried all of this. I have tested 4 different sd cards including a brand new one and 2 different raspberry pi. The checksum is matching and i've been using Etcher without issues each time

ymollard commented 3 years ago

Can you try the Poppy Torso image?

If you manage to start the UI unlike your attempts so far, you may then re-arrange cables this way so that only the upper body of the torso is connected to the USB2AX, if you want to startup motors.

SuperNiac commented 3 years ago

The torso image works perfectly with the same rPi 3 and sd card.

ymollard commented 3 years ago

OK I found a glitch in the Humanoid image, which probably happened in the github publishing pipeline. I have fixed the 3.0.0 release. Let me know if this image works for you. Don't forget to check the md5 sums.

SuperNiac commented 3 years ago

Issue fixed on my side : Humanoid 3.0.0 now working, don't know about @Zellerich's orignal issue.

Zellerich commented 3 years ago

Sorry for answering late. Everything works again on my side 👍 Thanks for your help!