Super quick update for anyone else receiving this error. By means of a serendipitous typo, simply using python instead of python3, will resolve this, and the script runs perfectly.
Greetings,
I recently became the proud owner of the 11x7 LED Matrix Breakout.
I’m having trouble with the Binary Clock example. When trying to run using python3 from a terminal, Thonny or IDLE, I receive the following error:
Traceback (most recent call last):
File "binary-clock.py", line 161, in <module>
main()
File "binary-clock.py", line 154, in main
clock = BinaryClock()
File "binary-clock.py", line 77, in __init__
Clock.__init__(self)
File "binary-clock.py", line 52, in __init__
Time.__init__(self)
File "binary-clock.py", line 35, in __init__
self.update()
File "binary-clock.py", line 137, in update
self._brightness_step()
File "binary-clock.py", line 120, in _brightness_step
] for hand_position in self._intensities.keys()
File "binary-clock.py", line 120, in <dictcomp>
] for hand_position in self._intensities.keys()
File "binary-clock.py", line 119, in <listcomp>
next(self._intensities[hand_position][hand_bit]) for hand_bit in range(self._hand_bits)
File "binary-clock.py", line 124, in _intensity
degrees = range(self._max_degree) + list(reversed(range(self._max_degree)))
TypeError: unsupported operand type(s) for +: 'range' and 'list'
Which is a little beyond my “L plate” python driver experience. Can anyone find the time to guide me into getting this running, please?
Thanks in advance for any gratefully received assistance. 👍