bk1285 / rpi_wordclock

Software to create a Raspberry Pi based wordclock
GNU General Public License v3.0
214 stars 107 forks source link

Sleep brightness setting not supported in color cycling mode #234

Closed FrankX0 closed 1 year ago

FrankX0 commented 1 year ago

As reported by @jimniki

jimniki commented 1 year ago

Hello Frank. I made the changes. No go. No lights on the clock at all. It was only when I hashed out all your +"additions" to the plugin.py file that it worked again. Maybe a typo somewhere? shrugs. Thanks heaps for your efforts regardless btw...

FrankX0 commented 1 year ago

Hi Jim, I cannot reproduce. Can you get the output from the terminal when you start the Python script? This probably shows the error which causes no lights on your clock. Thanks, Frank.

jimniki commented 1 year ago

It works on yours? That's excellent! It must be something I'm doing.... I cut/pasted your whole modified plugin.py file to avoid any typos on my end and with the flag in the config.cfg file set to True and False I still got no lights until I hashed out the modded lines... I'll try again now... cheers.

jimniki commented 1 year ago

Here's the errors when I start it up. No errors when I hash out the modded lines.

pi@wordclock1:~/rpi_wordclock $ sudo python3 wordclock.py 2022-11-01 08:37:22 wordclock1 root[1304] INFO Software version: v1.0.0-dev-138-g1b10921 2022-11-01 08:37:22 wordclock1 root[1304] INFO Parsing /home/pi/rpi_wordclock/wordclock_config/wordclock_config.cfg 2022-11-01 08:37:22 wordclock1 root[1304] INFO Interface type set to gpio_low 2022-11-01 08:37:22 wordclock1 root[1304] INFO Wiring configuration 2022-11-01 08:37:22 wordclock1 root[1304] INFO WCA_WIDTH: 11 2022-11-01 08:37:22 wordclock1 root[1304] INFO WCA_HEIGHT: 10 2022-11-01 08:37:22 wordclock1 root[1304] INFO Num of LEDs: 114 2022-11-01 08:37:22 wordclock1 root[1304] INFO Wiring layout: bernds_wiring 2022-11-01 08:37:22 wordclock1 root[1304] INFO Setting language to english. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin weather_forecast since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 0: "leds_off". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin feed_parser since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] WARNING Defaulting to reference value for [plugin_test_strip] activate 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 1: "test_strip". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin time_as_words_german since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin matrix since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin tetris since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 2: "ip_address". unexpected indent (plugin.py, line 181) 2022-11-01 08:37:22 wordclock1 root[1304] WARNING Failed to import plugin time_default! Traceback (most recent call last): File "/home/pi/rpi_wordclock/wordclock.py", line 82, in init self.plugins.append(import_module('wordclock_plugins.' + plugin + '.plugin').plugin(self.config)) File "/home/pi/rpi_wordclock/wordclock_plugins/time_default/plugin.py", line 181 has_run = True # IndentationError: unexpected indent 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 3: "shutdown". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 4: "time_in_seconds". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin time_as_words_dutch since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin sunrise since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin snake since it is set to activate=false in the config-file. 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 5: "rainbow". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Imported plugin 6: "restart". 2022-11-01 08:37:22 wordclock1 root[1304] INFO Skipping plugin time_matrix since it is set to activate=false in the config-file. Traceback (most recent call last): File "/home/pi/rpi_wordclock/wordclock.py", line 204, in

FrankX0 commented 1 year ago

It is complaining about indents:

File "/home/pi/rpi_wordclock/wordclock_plugins/time_default/plugin.py", line 181
has_run = True #
IndentationError: unexpected indent

It is complaining about row has_run = True # on line 181, but it is actually on line 151. When doing a copy of code, check for space to tab conversions. And maybe remove the # at the end of the line.

jimniki commented 1 year ago

will do. I'll let you know how I go. cheers.

On Tue, Nov 1, 2022 at 5:43 PM Frank Exoo @.***> wrote:

It is complaining about indents:

File "/home/pi/rpi_wordclock/wordclock_plugins/time_default/plugin.py", line 181 has_run = True # IndentationError: unexpected indent

It is complaining about row has_run = True # on line 181, but it is actually on line 151. When doing a copy of code, check for space to tab conversions. And maybe remove the # at the end of the line.

— Reply to this email directly, view it on GitHub https://github.com/bk1285/rpi_wordclock/issues/234#issuecomment-1298151358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKISWLIZPPJAJWZNVK3263LWGDCZ5ANCNFSM6AAAAAARSMMQDM . You are receiving this because you were mentioned.Message ID: @.***>

jimniki commented 1 year ago

Hi Frank. I thought I fixed plugin.py file. These are the errors I am getting now. Sorry, I am a noob. Thoughts?

Traceback (most recent call last): File "/home/pi/rpi_wordclock/wordclock.py", line 204, in

FrankX0 commented 1 year ago

The supplied information is as expected, except for AttributeError: 'wordclock' object has no attribute 'default_plugin'. This means that there is still an error in the time_default plugin. Can you get me the actual plugin.py file from time_default, so I can have a look what's wrong with it? If you are not sure how, you could use e.g. WinSCP if you have SSH enabled.

jimniki commented 1 year ago

Hello again. I found the culprit. One last line which wasn't indented. All working now. As a coding noob, I never imagined that indentations in python are actually part of the logic and not just cosmetic... Finicky little bugger isn't it! lol Anyway, Frank, you're my hero. Thank you kindly for all your support.

FrankX0 commented 1 year ago

Welcome to the wonderful world of Python!