texadactyl / rpi_clock

Raspberry Pi Clock & Weather display
GNU General Public License v3.0
13 stars 8 forks source link

Run perfect but got something wrong when I ssh the Raspberry #10

Closed DEV-XiA closed 4 years ago

DEV-XiA commented 4 years ago

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!

texadactyl commented 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?

DEV-XiA commented 4 years ago

Looks you make a great debug! Thank you so much! I m using the little 3.5 TFT screen in GPIO.