Closed lstew452a closed 2 years ago
Same issue here, there a known fix?
please show the error message.
Also be sure the default python version is version 2, not 3.
please show the error message.
Setting sound to max (assuming Monitor Tv controls volume).... Checking for NeoPixels Ambilight... Checking for GPIO Buttons... Starting gpio-keys Service... Checking for Temperature Sensors... Starting PiClock.... logging to screen. File "/home/pi/PiClock/Clock/PyQtPiClock.py", line 1264 print "getting current and forecast:" + time.ctime() ^ SyntaxError: invalid syntax
n0bel asked:
Also be sure the default python version is version 2, not 3.
This error looks like you are running python3 that needs "(" and ")"
How do you start the clock?
And what is your default python version?
In a terminal:
python --version
i change How do the default python --version
Start on the desktop a terminal session. Maybe via the application menu -> System tools -> LXterminal.
In the terminal do:
python --version
Then copy the result and paste here in a reply.
Support for python 2.7 ended in 2019. Looks like they took it out in latest release of the OS.
How do I add python 2 back into Raspbian? I tried looking up but it came inconclusive
edit: I believe sudo apt-get install python2
and editing all python
to python2
in the startup file worked, though I'm still receiving an error
Disabling screen blanking....
Setting sound to max (assuming Monitor Tv controls volume)....
Checking for NeoPixels Ambilight...
Checking for GPIO Buttons...
Checking for Temperature Sensors...
Starting PiClock.... logging to screen.
Traceback (most recent call last):
File "PyQtPiClock.py", line 8, in <module>
import dateutil.parser
ImportError: No module named dateutil.parser
Try my fork at https://github.com/SerBrynden/PiClock
I updated the code to Python 3 and PyQt5, and it seems to run well on Raspberry Pi OS versions Buster and Bullseye. I also added an option to use custom dark maps from MapBox, with a transparent layer for labels, borders, and roads on top of the radar imagery. This way the map details are not obscured by large rain storms.
The changes to Python 3 and Qt5 have worked pretty well, but there are intermittent crashes once in a blue moon that I haven’t fixed yet.
Occasionally, there are index out of range errors with the radar image tiles. I suspect the expected number of radar tiles don’t get downloaded properly from RainViewer sometimes. I’ve also seen JSON decode errors with the OpenWeatherMaps data, segmentation faults, and messages like “python3: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.”
I would like to get rid of all the global variables from the original code too, but they're prolific.
I haven't tested every feature, such as LED lighting, background switcher, temperature sensor, GPIO buttons, or IR remote control, since I don’t use those things.
Same issue. Bullseye uses PyQt 3.9 and it will not run on it. To be honest it wasn't even worth fighting getting PyQt2 on to it so I just loaded Buster and went about my day.
Wow I was just fighting to get pyqt4 working on bullseye and @SerBrynden posted a pyqt5 port. Thanks for that!
I tried using the PIClock and got this error.
isabling screen blanking....
Setting sound to max (assuming Monitor Tv controls volume)....
Checking for NeoPixels Ambilight...
Checking for GPIO Buttons...
Checking for Temperature Sensors...
Starting PiClock.... logging to screen.
Traceback (most recent call last):
File "/home/pi/PiClock/Clock/PyQtPiClock.py", line 17, in
@lstew452a you need to install PyQt5, per the instructions https://github.com/SerBrynden/PiClock/blob/master/Documentation/Install.md
sudo apt-get install python3-pyqt5
Try my fork at https://github.com/SerBrynden/PiClock
I updated the code to Python 3 and PyQt5, and it seems to run well on Raspberry Pi OS versions Buster and Bullseye. I also added an option to use custom dark maps from MapBox, with a transparent layer for labels, borders, and roads on top of the radar imagery. This way the map details are not obscured by large rain storms.
The changes to Python 3 and Qt5 have worked pretty well, but there are intermittent crashes once in a blue moon that I haven’t fixed yet.
Occasionally, there are index out of range errors with the radar image tiles. I suspect the expected number of radar tiles don’t get downloaded properly from RainViewer sometimes. I’ve also seen JSON decode errors with the OpenWeatherMaps data, segmentation faults, and messages like “python3: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.”
I would like to get rid of all the global variables from the original code too, but they're prolific.
I haven't tested every feature, such as LED lighting, background switcher, temperature sensor, GPIO buttons, or IR remote control, since I don’t use those things.
Thanks PiClock works again
@SerBrynden Thanks so much it worked first try!
I've updated the install documentation to refer to a correct version of Raspberry Pi OS that has Python2 still in it. The docs always clearly said "For Raspbian Stretch", but but links go to the current download pages, the current version of which has passed PiClock by. I'll be doing a Python 3 version soon. An older version ported to Python3 already exists on the dev branch, but it is lacking the newest features.
Thanks so much for continuing to make this available! I have it in a bunch of screens in my house and love it!
Lee
On Thu, Dec 9, 2021 at 8:37 AM Kevin Uhlir @.***> wrote:
I've updated the install documentation to refer to a correct version of Raspberry Pi OS that has Python2 still in it. The docs always clearly said "For Raspbian Stretch", but but links go to the current download pages, the current version of which has passed PiClock by. I'll be doing a Python 3 version soon. An older version ported to Python3 already exists on the dev branch, but it is lacking the newest features.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/n0bel/PiClock/issues/225#issuecomment-989859436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4ASA56FCCR2B4CZHWKLE3UQCWIRANCNFSM5H2XICAA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Lee O. Silverman, M.A., Owner & Voice Talent Leecast Professional Voice-Over Services http://leecast.com
I had to re-install the OS n my raspberry pi and when run PIClock I get error. Traceback (most recent call last):
File "/home/pi/PiClock/Clock/PyQtPiClock.py", line 15, in
This seems to a Dark sky issue. Please advise.
def getwx_ds(): global wxurl global wxreply print "getting current and forecast:" + time.ctime() wxurl = 'https://api.darksky.net/forecast/' + \