genebean/PiWeatherRock

Ran into a snag installing on Raspbian 8

Closed this issue · 35 comments

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

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

Sent with GitHawk

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.

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

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

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

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

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

@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.

Will do!

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

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"

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.

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

What does ls -la show?

Sent with GitHawk

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

Does git pull work?

Sent with GitHawk

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

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

Sent with GitHawk

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

Much appreciated

Sent with GitHawk

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

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

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

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

Sent with GitHawk

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

Sent with GitHawk

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"

Did you type git pull while inside your PiWeatherRock folder?

Sent with GitHawk

Mind continuing this via Gitter?

Sent with GitHawk

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

Sent with GitHawk