chiefwigms / picobrew_pico

MIT License
149 stars 63 forks source link

about menu error #248

Closed narleth closed 3 years ago

narleth commented 3 years ago

Latest version (as of 2021.02.09) installed on Ubuntu (Ubuntu 20.04.2 LTS).

The About menu selection does not work. Following posts to terminal when clicking "About" in the System drop down (http://0.0.0.0/about).

ifconfig: option -l' not recognised. ifconfig:--help' gives usage information. xargs: ipconfig: No such file or directory /bin/sh: 1: git: not found [2021-02-09 15:36:42,314] ERROR in app: Exception on /about [GET] Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/dist-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](req.view_args) File "/usr/lib/python3.8/picobrew_pico-master/app/main/routes_server.py", line 303, in about gitSha = subprocess.check_output("cd {0}; git rev-parse --short HEAD".format(base_path()), shell=True) File "/usr/lib/python3.8/subprocess.py", line 411, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'cd /usr/lib/python3.8/picobrew_pico-master; git rev-parse --short HEAD' returned non-zero exit status 127. 127.0.0.1 - - [09/Feb/2021 15:36:42] "GET /about HTTP/1.1" 500 -

tmack8001 commented 3 years ago

@narleth from your picobrew_pico folder do you have a git repository? This exception log shows that there was a non-zero exit status of git rev-parse --short HEAD.

What is the results of running git rev-parse --short HEAD in that directory?

tmack8001 commented 3 years ago

From the earlier log it shows that you don't even have git installed.... other than Git and System information there isn't anything else helpful on this /about screen anyways.

You will likely want git installed so you can have single button click updates available on your deployment environment of choice (ie. Ubuntu).

sickchilly commented 3 years ago

Also, where is your “picobrew_pico” directory located? Back when I was running this on my Ubuntu server, I had to not only have git (and the other prerequisites installed) but I also had to put it in the root directory owner set to root:root. I never dug into why that was as I transitioned to a Docker container, then to a dedicated Pi.

tmack8001 commented 3 years ago

Also, where is your “picobrew_pico” directory located?

where ever you put it and are running python from. For instance, our raspberry pi setup puts this at /picobrew_pico. If you are using our provided image for RaspberryPi this is all setup for you already with included logic to determine if your setup is indeed a RaspberryPi or not (assuming if it is that it is our provided image).

narleth commented 3 years ago

I moved the picobrew_pico director to /picobrew_pico and chown'd to root.

I installed git. when I run git rev-parse --short HEAD I get "fatal: not a git repository (or any of the parent directories): .git" so I fetched " https://github.com/chiefwigms/picobrew_pico.git" and now I get fatal: Needed a single revision

Thanks

On Wed, Feb 10, 2021 at 7:15 AM Trevor Mack notifications@github.com wrote:

Also, where is your “picobrew_pico” directory located?

where ever you put it and are running python from. For instance, our raspberry pi setup puts this at /picobrew_pico. If you are using our provided image for RaspberryPi this is all setup for you already with included logic to determine if your setup is indeed a RaspberryPi or not.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chiefwigms/picobrew_pico/issues/248#issuecomment-776666725, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZMNOGVJOJF4B6VSILDCCTS6J2E5ANCNFSM4XLX6EGQ .

chiefwigms commented 3 years ago

So odds are you just downloaded source as a zip file... I'd just save any recipes/config.yaml and do git clone https://github.com/chiefwigms/picobrew_pico.git in whatever directory you want and follow Option 2 on the main page

narleth commented 3 years ago

That worked! Sorry for the trouble. Many thanks for the help!

On Wed, Feb 10, 2021 at 2:03 PM Pete notifications@github.com wrote:

So odds are you just downloaded source as a zip file... I'd just save any recipes/config.yaml and do git clone https://github.com/chiefwigms/picobrew_pico.git in whatever directory you want and follow Option 2 on the main page

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chiefwigms/picobrew_pico/issues/248#issuecomment-776939348, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZMNOCKX5GNC43A3A5GHM3S6LKAVANCNFSM4XLX6EGQ .