genebean / PiWeatherRock

Displays local weather on a Raspberry Pi
https://piweatherrock.technicalissues.us
MIT License
50 stars 23 forks source link

Ran into a snag installing on Raspbian 8 #18

Closed ronstar2820 closed 4 years ago

ronstar2820 commented 4 years ago

I had the previous Weather.com version running for years. For some reason, the Weather.com API is no longer working, so I looked for an alternative.

Found this app developed by the developer of my previous app, so I gave it a try.

I followed instructions and the install died

I see quite a few notices that the app is intended to run on Raspbian 10. I have Raspbian 8. So maybe that is my problem.

Probably not a bug, but I can't seem to change the "bug" label

IMG_8311

genebean commented 4 years ago

I’ll take a look today. I think the last line of output in your screenshot may be key.

Sent with GitHawk

genebean commented 4 years ago

I am going to check a couple of things on my side but I also have a question for you: do you have a need to stay on Raspbian 8 or are you game to upgrade? Personally, I have done the in-place upgrades and had good success.

ronstar2820 commented 4 years ago

Thanks for the quick response! I just formatted my card and did a fresh install of Raspbian 10. I'll report back my findings.

genebean commented 4 years ago

👍 Please do let me know how it goes because I do want to make sure that this works on current versions of Raspbian.

ronstar2820 commented 4 years ago

Ok. Everything finished, but no service started on it's own. So I did "sudo systemctl status PiWeatherRock" and got the screenshot below. Also typed sudo python weather.py and got the other screenshot. Looks like weather.py can't find a module named "darksky" Screen Shot 2020-01-26 at 2 53 47 PM Screen Shot 2020-01-26 at 2 54 03 PM

genebean commented 4 years ago

I think I know what is up... I should be able to post something back in about 10 or 15 minutes

ronstar2820 commented 4 years ago

Thanks!

On Jan 26, 2020, at 2:57 PM, Gene Liverman notifications@github.com wrote:

I think I know what is up... I should be able to post something back in about 10 or 15 minutes

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63UOGL2GYPC5U7MV5YUDQ7X2KVA5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ55WKA#issuecomment-578542376, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63UIHDJD3SVBF2IO4VWLQ7X2KVANCNFSM4KLUXLMQ.

genebean commented 4 years ago

I have the issue figured out, about to push an update.

genebean commented 4 years ago

@ronstar2820 - would you mind running the following commands for me to validate the fix?

$ cd ~/PiWeatherRock
$ git checkout fix_pyhton
$ sudo puppet apply /home/pi/PiWeatherRock/setup.pp

The branch I am asking you to try has the following changes:

diff --git a/setup.pp b/setup.pp
index 5a1f0a4..f7181e4 100644
--- a/setup.pp
+++ b/setup.pp
@@ -83,10 +83,9 @@ vcsrepo { '/home/pi/PiWeatherRock':
 }

 python::requirements { '/home/pi/PiWeatherRock/requirements.txt':
-  virtualenv   => '/home/pi/PiWeatherRock',
   pip_provider => 'pip3',
-  owner        => 'pi',
-  group        => 'pi',
+  owner        => 'root',
+  group        => 'root',
   cwd          => '/home/pi/PiWeatherRock',
   require      => [
     Package[ $main_packages, $piweatherrock_packages, ],

Once you have run the commands, I suggest you go ahead and switch back to master by running git checkout master.

ronstar2820 commented 4 years ago

Will do!

genebean commented 4 years ago

BTW, for manual testing outside of systemd you will want to use python3 instead of python

ronstar2820 commented 4 years ago

I'm a novice at this and don't understand what you mean by python3 vs python.

Don't I just enter these commands on terminal?

Is the second line supposed to be "python" or "pyhton"

In either case I get "error: pathspec 'fix_python' did not match any file(s) known to git"

genebean commented 4 years ago

Oops, sorry about the assumptions!

So, you have two commands on your system: python runs Python version 2 whereas python3 runs Python version 3. I am only testing against the latter since Python 2 is now end of life.

In your terminal, you will first need to run git fetch and then the git checkout fix_python should work. Yes, the command above was a typo too.

ronstar2820 commented 4 years ago

I get "Error: cannot open .git/FETCH HEAD: Permission denied" when I type git fetch on the terminal

genebean commented 4 years ago

What does ls -la show?

Sent with GitHawk

ronstar2820 commented 4 years ago

and a few more files if I scroll more Screen Shot 2020-01-26 at 4 00 39 PM

genebean commented 4 years ago

Does git pull work?

Sent with GitHawk

ronstar2820 commented 4 years ago

No - I get "error: cannot open .git?/FETCH HEAD: Permission Denied"

genebean commented 4 years ago

It is acting like sudo got used somewhere... let me get back to you shortly.

Sent with GitHawk

genebean commented 4 years ago

I think I see the flaw in my approach to fixing the issue and why it’s causing problems. I should be able to resolve it tonight

Sent with GitHawk

ronstar2820 commented 4 years ago

Thanks! It’s no problem for me to start from scratch if need be. Whatever I can do to help make it easier for you.

On Jan 26, 2020, at 4:31 PM, Gene Liverman notifications@github.com wrote:

I think I see the flaw in my approach to fixing the issue and why it’s causing problems. I should be able to resolve it tonight

Sent with GitHawk http://githawk.com/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63ULMI6C5GGLH7E6BPF3Q7YFMHA5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ57THQ#issuecomment-578550174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63UINRNDJQYSBTEL4YBDQ7YFMHANCNFSM4KLUXLMQ.

genebean commented 4 years ago

Much appreciated

Sent with GitHawk

genebean commented 4 years ago

FYI: I started a Gitter for this project to facilitate real time chats too. I’ll be in there a little later. https://gitter.im/PiWeatherRock/community

Sent with GitHawk

genebean commented 4 years ago

@ronstar2820 if #20 doesn't actually fix your issue feel free to reopen this.

ronstar2820 commented 4 years ago

Thanks - I’m giving it a try now

On Jan 26, 2020, at 8:35 PM, Gene Liverman notifications@github.com wrote:

@ronstar2820 https://github.com/ronstar2820 if #20 https://github.com/genebean/PiWeatherRock/pull/20 doesn't actually fix your issue feel free to reopen this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63UIQPSHBQUMSCQEY4WLQ7ZB53A5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ6FJJY#issuecomment-578573479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63UK6XTHGMP56XOK7IY3Q7ZB53ANCNFSM4KLUXLMQ.

ronstar2820 commented 4 years ago

Still the same situation. Ran install. Service doesn't startup. Checked status and get same screenshot as above and same error running weather.py where it can't find module darksky

genebean commented 4 years ago

Would you humor me and try the new update section of the readme?

Sent with GitHawk

ronstar2820 commented 4 years ago

Thanks - This is going to take a while. Since it didn’t work after your fix, I erased everything in PiWeatherRock. But I couldnt totally get rid of the directory, so I started again using PiWeatherRock2

Anyway, I’ll keep plugging

On Jan 26, 2020, at 9:26 PM, Gene Liverman notifications@github.com wrote:

Would you humor me and try the new update section of the readme?

Sent with GitHawk http://githawk.com/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63UNF6EBI5L3DRI5TQILQ7ZH6VA5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ6G2CQ#issuecomment-578579722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63UOTI6F6NI7EZ5AU6DDQ7ZH6VANCNFSM4KLUXLMQ.

genebean commented 4 years ago

You can kill the entire directory by running sudo rm -rf /home/pi/PiWeatherRock

Sent with GitHawk

ronstar2820 commented 4 years ago

Thanks! I’ll start over with a fresh PiWeatherRock

On Jan 26, 2020, at 9:32 PM, Gene Liverman notifications@github.com wrote:

You can kill the entire directory by running sudo rm -rf /home/pi/PiWeatherRock

Sent with GitHawk http://githawk.com/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63UIZRFNRMKZZRSNDJUDQ7ZIWJA5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ6G7YY#issuecomment-578580451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63ULLJM66GBHEJFQEVN3Q7ZIWJANCNFSM4KLUXLMQ.

ronstar2820 commented 4 years ago

Nope - still doesn't work. Same situation as before - same as above screenshots. Tried the update section of the readme. I get "no such file or directory" when I type "pi@rock:~/PiWeatherRock $ git pull"

genebean commented 4 years ago

Did you type git pull while inside your PiWeatherRock folder?

Sent with GitHawk

ronstar2820 commented 4 years ago

yes and no. I’ve tried it both ways

On Jan 26, 2020, at 10:21 PM, Gene Liverman notifications@github.com wrote:

Did you type git pull while inside your PiWeatherRock folder?

Sent with GitHawk http://githawk.com/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/18?email_source=notifications&email_token=AOL63UNIVTNSFQZZEMDWKCLQ7ZONFA5CNFSM4KLUXLM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ6IPAI#issuecomment-578586497, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOL63UO6JPJMPYFUJBSPFOTQ7ZONFANCNFSM4KLUXLMQ.

genebean commented 4 years ago

Mind continuing this via Gitter?

Sent with GitHawk

genebean commented 4 years ago

We figured out via Gitter that he issue was the api key needed to have single quotes around it.

Sent with GitHawk