Closed DEV-XiA closed 4 years ago
The former oops() routine (corrected today) made a mistake in initializing the Python 3 logging object. Not only was it mis-coded but it is unnecessary!
Here is what you should have seen (no traceback):
python3 rpi_clock.py
[2020-05-01 09:44:58,609]::CRITICAL::OOPS, initialization: Must not run in SSH session
Please look at the initialize_the_process() function. This diagnosis was put in their consiously.
rpi_clock needs most of a full desktop to run Tk for Python. ssh
only can provide a minimal X-Windows capability using the -X or -Y options. If I am wrong and you find a way to run rpi_clock in an ssh
session, please let me know.
By the way, are you using a hardware add on board or did you set FLAG_WINDOWED=True to display to a connected monitor?
Looks you make a great debug! Thank you so much! I m using the little 3.5 TFT screen in GPIO.
Nice project and run perfect, .cfg easy to understand, but I got something wrong info when I ssh to my raspberry, can you help me to solve it or told me what happened.
pi@raspberrypi:~ $ Traceback (most recent call last): File "rpi_clock.py", line 345, in
initialize_the_process()
File "rpi_clock.py", line 151, in initialize_the_process
oops("initialization: Must not run in SSH session")
File "rpi_clock.py", line 49, in oops
parms.logging_init("OOPS", True)
File "/home/pi/rpi_clock/bin/rpi_clock_parameters.py", line 40, in logging_init
fh = logging.FileHandler(log_file)
File "/usr/lib/python3.7/logging/init.py", line 1079, in init
filename = os.fspath(filename)
TypeError: expected str, bytes or os.PathLike object, not bool
Thank you!