-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsump.py won't run after upgrade #82
Comments
Are you sure you are running version 1.9.3? That nosection error was fixed in version 1.9.2 also you should not be running rsump.py from sudo, but from the regular account. Check your version number in /home/pi/raspi-sump/VERSION If you still have errors and are running version 1.9.3, run the command |
It looks like the VERSION file doesn't exist. Via a
I'm not against a complete re-install if that's the easiest way. |
ok, looks to me like you did not run the proper install command. You have to run it exactly as follows
|
Yep that's the command I ran previously. I ran it again to be sure and it gives the following output:
|
ok so do the following;
select y to accept and then
|
Ok so I did all of this. Before I did, I renamed my /home//raspi-sump directory to /home//raspi-sump.old. Based on the install instructions here: https://github.com/alaudet/raspi-sump/blob/master/docs/install.md I was expecting to see a new /home//raspi-sump ceated. However I didn't see one get created. I did notice upon uninstalling that pip seems to think raspi-sump is now located elsewhere. See below:
If this is working as you expect, is /home//raspi-sump actually a symlink to /usr/local/lib/python3.9/dist-packages/home//raspi-sump ? If so, should I just make the symlink manually? Or is there something larger going on here? |
This is normal, you dont have to rename anything. /home/user/raspi-sump contains all of the user environment stuff (conf files, charts, csv, logs etc etc). /usr/local/bin and /usr/local/lib.... is where executables and llibraries are installed on the system. No symlinks are needed, after you install the executables are in your path so can access rsump.py, rsumpwebchart.py etc etc from anywhere. By renaming the /home/user/raspi-sump folder you would have created a new one on install and now have to recreate your raspisump.conf file. If you leave it, it would have saved it. Is it working now? |
Ok sorry - I'm just going by the install instructions here: https://github.com/alaudet/raspi-sump/blob/master/docs/install.md. They make it sound like /home/user/raspi-sump will exist with a file "sample_config" in it. That directory didn't get created for me. I do however still have my original raspi-sump directory - its just named something else. So I can always pull any of that stuff back in. Any idea why /home/user/raspi-sump didn't get created? FWIW, I retried the uninstall / re-install a couple of times and /home/user/raspi-sump didn't get created during any of those attempts. I did try to just rename my backed up directory back to raspi-sump so that the service would use my raspisump.conf and when I tried to start the service it didn't failed. Running "/usr/local/bin/rsump.py" on its own returns the following:
|
I don't know, something seems off to me, maybe corrupted on your install. Also, again, do not run rsump.py with sudo. just run rsump.py directly. You install with sudo, you run the program as a regular user, not with admin privilidedges The following has always worked for me; Remove
Install fresh
Now follow the instructions for systemd in the doc. |
I have most everything working now. It looks like there were some items that didn't get added to the raspisump.conf file as part of the upgrade that prevented the service from starting. That's what was causing the error above. I added those by looking at the default raspisump.conf file. So now the raspisump service and rsumpwebchart timer start successfully. However, I'm not able to enable either one of them. When I try to enable them here are the errors I get:
I have tried creating either of the directories that it mentions and copying the .service and .timer files from their default location into the respective directories and that then causes an access denied error. Any idea what might be going on with not being able to enable the service and the timer? |
Now that it is working perhaps rerun the |
Unfortunately it still throws this:
Any chance you can give me a properly formatted VERSION file? The installer didn't create that for me. |
Did you create a user folder? User should show your actual username like pi. Something is off with your installOn Aug 21, 2023, at 8:32 PM, fitig ***@***.***> wrote:
Unfortunately it still throws this:
$ rsumpsupport
Traceback (most recent call last):
File "/usr/local/bin/rsumpsupport", line 71, in <module>
raspi_sump_version = get_raspi_sump_version(actual_user)
File "/usr/local/bin/rsumpsupport", line 28, in get_raspi_sump_version
with open(f"/home/{actual_user}/raspi-sump/VERSION", "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/raspi-sump/VERSION'
Any chance you can give me a properly formatted VERSION file? The installer didn't create that for me.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Isn't the user folder just the home directory of the user who I run the install command as? If yes, then its my home directory so it was already there. Inside of that is where my raspi-sump directory is. Inside of that directory (i.e. /home/myuserid/raspi-sump) is where I think the rsumpsupport script expects to find a VERSION file. That's why I was asking for a VERSION file. I ended up just grabbing the one from the root of the repo and put in there. Output is attached. Note that the service and timer were not started because I recently rebooted my pi from doing updates. I started the service shortly before I ran the rsumpsupport script. This is why I'm trying to get the service enabled so that it'll automatically start when my pi boots up. In looking at it, I'm not seeing anything obvious that tells me why I'm getting the error upon enabling the service and the timer. Let me know if anything sticks out to you. Thanks again for all the help! |
I just solved my own problem. The reason why I couldn't enable the service(s) was because the entire /home/myuserid/.config/systemd/user directory was symlinked to /usr/local/lib/python3.9/dist-packages/home/todd/.config/systemd/user. This looks like it might be by design? Not sure. Either way, the act of enabling the service requires that a symlink is made within that directory and if its already symlinked, creating another symlink inside of it isn't allowed. So when I remove the symlink to /usr/local/lib/python3.9/dist-packages/home/todd/.config/systemd/user and copy all the contents from that directory to a newly created /home/myuserid/.config/systemd/user and try it everything works. So when it works, you get the following output:
Out of curiosity, why did you choose to put the .service files in the user's directory and not in /etc/systemd/system or /etc/systemd/user or any of the other typical systemd locations? Not saying its wrong - just where I've been used to seeing them so I want to understand. Thanks again for being helpful! |
I have never seen a user's home .config symlinked to a system folder. It must have been that way before your upgrade, I don't mess with that in my install script. I am planning a redesign of raspisump in the future as python is getting a lot more picky in how applications are installed. The latest debian bookworm release does not even work with the current install instructions at all. It doesnt allow install to the system Python without further install command hacks. So I need to rethink my approach. Mostly this application is run on a pi that is dedicated to one task and this approach makes it a bit easier as all files are under user home. I am evaluating how I want to setup the whole environment in the future that will make it easier to deploy and easy for users to configure. Maybe within a virtual environment or within a docker container or something like that. I can also look at creating deb files so that I could submit them to the raspios package maintainers to install with apt, but thats another rabbit hole. This issue seems like a one off situation and gladly you solved it. So I am going to close the issue. thanks |
After upgrading to 1.9.3 from a pre 1.8 version (with every thing running without issue) when I try to run rsump.py:
Any ideas what might be going on?
The text was updated successfully, but these errors were encountered: