Closed R0lleston closed 1 year ago
I just noticed the same and did a little digging. For me, it seems that:
pi
, but as per documentation (and also for hardware permission reasons), wordclock starts as root
trough a cron jobgit describe --tags
"/home/pi/rpi_wordclock/wordclock.py", line 31
)I was able to get it up and running, by running the following command as root:
git config --global --add safe.directory /home/pi/rpi_wordclock
This will add the folder where the wordclock application is installed to the git config and mark it as secure.
This ends up in /root/.gitconfig
with
[safe]
directory = /home/pi/rpi_wordclock
This will probably impact every user which installs on a new OS or does package upgrades. I can not say what the best solution is, but some that come into my mind are:
git config --global --add safe.directory /home/pi/rpi_wordclock
for root during the installation / manual (not sexy but a "quick fix")128
error code in the subprocess call (only a workaround, does not solve the real problem and I am not sure that the subprocess call supports this anyways)These are my quick findings and ideas. I hope the command above helps to solve it for other people until a definitive fix is found.
For us non technical sorts, why would this occur with a working system (not a clean os install) ? Is it the way the word clock has been written or the external programs that interface with it ?
If my analysis is correct, it is because a newer version of git was installed and this version is now more picky concerning file permissions. But this was on my system after I updated the packages, so it makes sense on my systesm. Did my solution fix it for you?
@R0lleston can you supply what is being printed in the terminal?
@FrankX0 i think I might have powered down the pi a few too many times without a proper shutdown, I think I’ll need to do a full reinstall of the OS. I’ll let you know when I’ve done that
@FrankX0 have reinstalled buster and loaded the word clock. Can confirm it work’s initially, but soon drops off, no longer updates time and essentially freezes up.
The connection to the app fails, and it longer updates logs when viewed from putty. The pi is still accessible via putty however
you can restart by the sudo python3 word clock.py commmand
@oxivanisher tried your fix (not as root, but as user pi) worked for a bit but ultimately looked up again
@R0lleston if you have the same problem as me, you have to do the "fix" (more workaround) as root or it will not help.
@oxivanisher ok, I’ll work out how to do that and give it a crack
@R0lleston I can help you with that. Connect to the wordclock and run sudo -i
. After that, you should be working as root. You can exit the root shell again by running exit
.
@R0lleston I expect the clock application somewhere stops due to an error. Can you supply what is being printed to the terminal?
@FrankX0 see previous post. As mentioned previously the clock was working fine prior to an update of the Buster OS
This looks fine. There is no information after "Running plugin time_default"? Also not after a few minutes?
Can’t tell the exact time it dies, but it didn’t change any of the data after 3 or 4 mins. Interestingly enough it seems to keep going (more than 5 mins) if the app to change settings is open @FrankX0
Ok confirmed that if I have a connection to the clock via its app it operates fine. I tested it for 1.5hrs with the app open on a chrome tab on my phone, time was constantly correct. Take away that connection and after about 5 mins the clock stops updating and the SSH drops out
It seems to me the raspberry pi loses its WiFi connection. Can you try the following from a terminal: sudo iw dev wlan0 set power_save off
@FrankX0 did the above and can confirm the issue remains
I don't see why this issue would be related to the word clock application. Can you test the network connection without running the word clock application? Can you try Bullseye instead?
@FrankX0 @oxivanisher looks like I might have found the issue. Seems that the problem occurs when an ssh connection or the app is no longer connected to the pi. A little googling indicates that python programs stop working after ssh disconnects (buggered if I can work out why this has suddenly become an issue with workclock). If you install SCREEN and then run screen python3 rpi_wordclock.py it works as it used to. Screen appears to keep programs running in the background.
This is expected behaviour and not typical for the wordclock. You might want to start the clock automatically after power on:
Thanks for looking into this, @FrankX0 @oxivanisher.
@R0lleston, I close this for now.
Best, Bernd
I had the same problem after a fresh installation. I had to start the clock myself because the cronjob did not work following the ReadtheDocs 'installation' manual. After @oxivanisher trick, the clock runs without any issues.
Silly me decided to update the buster os on my pi this morning, but now the clock will not update the time.
initially running the word clock.py loads the clock, sets the correct time etc, But after this the time no longer refreshes.
Before the buster package update it was working perfectly
any ideas.