Here is my test program I used for troubleshooting.
The test app does not do much. You can run it with “python -i wip1.py”. It just sets things up.
Than at the python prompt can you do things such as "set_color(“red”) which will turn the strip whatever color you selected.
The problem occurs when I try to run the BaseStripAnim in the led_pattern() class. It used the valid_patterns.py which is just a collection of various color patterns.
If you run “play_pattern(valid_patterns.barney)” the v3.4.15 will begin an animation of purple scrolling. v3.4.35 throws an exception.
I am running this on Windows 10 Pro with an AllPixel.
Example:
python -i .\wip1.py
set_color(“red”)
set_color(“green”)
set_color(“blue”)
set_color(“black”)
play_pattern(valid_patterns.forest)
WARNING - deprecated - BaseAnimation.run
Traceback (most recent call last):
File “”, line 1, in
File “.\wip1.py”, line 71, in play_pattern
anim.run(fps=FPS)
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation.py”, line 204, in run
self.start()
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation.py”, line 119, in start
self.threading.start()
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation_threading.py”, line 80, in start
self.target()
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation_threading.py”, line 40, in target
self.run()
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation.py”, line 128, in run_all_frames
for i in self.generate_frames():
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation.py”, line 136, in generate_frames
self._run_one_frame()
File “C:\Users\hdb47\hdbcentos6\hbreeden\Documents\Development\Python\PyImageSearch\env\lib\site-packages\bibliopixel\animation\animation.py”, line 150, in _run_one_frame
self.step(self.runner.amt)
File “.\wip1.py”, line 51, in step
self._led.set(i, self._colors[(self._step + i) % len(self._colors)])
AttributeError: ‘led_pattern’ object has no attribute ‘_step’
validPatterns.py (8.29 KB)
wip1.py (1.96 KB)
···
On Tuesday, November 20, 2018 at 4:31:43 PM UTC-6, Harold Breeden wrote:
I have a BiblioPixel project up and running using the BaseStripAnim from BiblioPixel-3.4.15.
I am working a new project so made sure I was using the most current libraries. I use VirtualEnv which saved me in this case. When I updated BiblioPixel if got BiblioPixel-3.4.35. This version broke my animation. If I revert back to v3.4.15 it works just fine.
I found a difference in the self.step() module that is inherited from Animation() base class.
I followed the instructions on https://github.com/ManiacalLabs/BiblioPixel/wiki/Writing-an-Animation which still has the original code I used in my first project. In v3.4.35 it hits an exception on self._step.
I reviewed the differences between animation.py in v3.4.15 and 3.4.35 and found that the module the self.step have been changed to just a pass. I tried doing that to my project but than no animation runs.
Any suggestions on how I get 3.4.35 to function as originally intended?
I don’t mind learning the new methods but I need my original project to continue running without having to worry about which BiblioPixel library I am using.