BiblioPixelAnimation Strip Errors

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

I was able to make the edits, it seems like I was entering the color values incorrectly

I had tried colors=[“Red”,“Green”,“Blue”]. but it didn’t like the name strings

I finally tried colors=[(255,0,0),(0,255,0),(0,0,255)] an it worked

I may have had the same issue on other animations that required color array in RGB values and not names.

It’s still weird that my files list is smaller the on Github for BiblioPixelAnimations directory

Peter,
You are apparently getting all your python stuff from https://www.piwheels.hostedpi.com which is wrong. I have no idea what that is.

Your installed BiblioPixelAnimations is BiblioPixelAnimations-3.20171123.54201 which literally doesn’t exist… the most recent official version is from 2017-09-23: https://pypi.python.org/pypi/BiblioPixelAnimations

And the latest code for the official version has that division error fixed.

Hmm… so looking into piwheels some more. This is gravely concerning. as apparently that’s the default on Pi now?! What?

And they are building these packages but with clearly old code. Will have to investigate.

···

On Wed, Dec 6, 2017 at 7:08 AM, Tom Swirly tom@swirly.com wrote:

(I have a pull request out for the color names - https://github.com/ManiacalLabs/BiblioPixel/pull/509 )

On Wed, Dec 6, 2017 at 12:27 PM, Tom Swirly tom@swirly.com wrote:

Hello, Peter, and sorry for the delay!

Using strings for colors in lists

As you discovered, you can’t (yet) put a string color name as a pixel. You can do things like this:

from bibliopixel import colors

Set one color

layout.set(0, colors.Beige)

Get a color from a string

color_name = input('Enter a color name: ')

layout.set(3, colors.COLORS[color_name])

There’s a huge list of colors, and it’s here.

Being able to set from a string is obviously useful, and I filed it as issue #508. It should be pretty easy to get to.

Github file list

I checked, and you are indeed missing five files from BiblioPixelAnimations.strip:

ColorFill.py, Pulse.py, README.md, SaberBlade.py, Twinkle.py

I just did a clean install here, and I didn’t reproduce this - I got those five files.

Weird! Adam?


/t

https://tom.ritchford.com

https://tom.swirly.com

On Wed, Dec 6, 2017 at 6:37 AM, Peter Strohmeyer p.strohmeyer@gmail.com wrote:

I was able to make the edits, it seems like I was entering the color values incorrectly

I had tried colors=[“Red”,“Green”,“Blue”]. but it didn’t like the name strings

I finally tried colors=[(255,0,0),(0,255,0),(0,0,255)] an it worked

I may have had the same issue on other animations that required color array in RGB values and not names.

It’s still weird that my files list is smaller the on Github for BiblioPixelAnimations directory

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/4265e78c-570b-42fe-aecc-7cbc8c36e4f5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

/t

https://tom.ritchford.com

https://tom.swirly.com

Thanks for looking into it.

I’m having another problem, When I setup a json file for SearchLights, and for the color array I have converted the color names in the file to their RGB equivalent.

{

“driver”: {

“typename”: “serial”,

“ledtype”: “WS2812B”,

“num”: 244,

“c_order”: “GRB”

},

“layout”: {

“typename”: “strip”

},

“animation”: {

“typename”: “sequence”,

“animations”: [

{

“animation”: {

“typename”: “BiblioPixelAnimations.strip.Searchlights.Searchlights”,

“name”: “Searchlights”,

“colors”: [[60,179,113],[147,112,219],[199,21,133]],

“tail”: 10,

“start”: 0,

“end”: -1

},

“run”: {

“seconds”: 5,

“fps”: 30,

“amt”: 4

}

}

]

}

}

When I run it, I get this error message:

INFO - devices - Using COM Port: /dev/ttyACM0, Device ID: 0, Device Ver: 0

WARNING - animation_threading - Frame-time of 33ms set, but took 38ms!

ERROR: list index out of range

I have tried less and more values but no joy. So how to properly construct the colors array?

···

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

Peter,
I’m online now :slight_smile:
I"m nearly 100% certain it’s the PiWheels thing Tom mentioned. For whatever reason, PiWheels was picking up a version of the animations that was for BiblioPixel 2.x which is Python 2.7 only whereas BiblioPixel 3.x is Python 3.

The reinstall command from Tom should get you sorted as we’ve had the PiWheels guys remove our packages from their registry (there was no point as they are pure python).

···

On Thu, Dec 7, 2017 at 6:49 AM, Tom Swirly tom@swirly.com wrote:

Hey, Peter!

So I tried out your code here and :-/ it unfortunately worked right the first time! I had to make a tiny change - there’s an extra comma on this line:

“colors”: [[60,179,113],[147,112,219],[199,21,133]],

but if that were the issue, you get a clear error message telling you what line and column have the error.

I’m suspecting that, again, it has to do with this whole “piwheels installing a very old codebase value”. But the diagnosis procedure will figure this out.

OK!

So first things first - let’s get a better look at that error message. You want to add the --verbose or -v flag to your bp command line - something like this:

bp your-file-here.json -v

The --verbose flag prints the entire error and not just the last message so we can see where in the code it is.

Once you have that output, then try force-updating bp from the most recent version:

pip install --upgrade --force-reinstall bibliopixel

and then try it again and see if it resolves correctly this time.

We can almost certainly fix this problem pretty fast. I will be on pretty continuously until 8PM CET (which is 2PM EST or 11AM PST, but Adam will be online before that.

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAOuQWfWAD2s6MsMBe8Z4Xi-sgNoyJrxrO_JP%3DP_Hsr3VABrKbQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

On Thu, Dec 7, 2017 at 7:44 AM, Peter Strohmeyer p.strohmeyer@gmail.com wrote:

Thanks for looking into it.

I’m having another problem, When I setup a json file for SearchLights, and for the color array I have converted the color names in the file to their RGB equivalent.

{

“driver”: {

“typename”: “serial”,

“ledtype”: “WS2812B”,

“num”: 244,

“c_order”: “GRB”

},

“layout”: {

“typename”: “strip”

},

“animation”: {

“typename”: “sequence”,

“animations”: [

{

“animation”: {

“typename”: “BiblioPixelAnimations.strip.Searchlights.Searchlights”,

“name”: “Searchlights”,

“colors”: [[60,179,113],[147,112,219],[199,21,133]],

“tail”: 10,

“start”: 0,

“end”: -1

},

“run”: {

“seconds”: 5,

“fps”: 30,

“amt”: 4

}

}

]

}

}

When I run it, I get this error message:

INFO - devices - Using COM Port: /dev/ttyACM0, Device ID: 0, Device Ver: 0

WARNING - animation_threading - Frame-time of 33ms set, but took 38ms!

ERROR: list index out of range

I have tried less and more values but no joy. So how to properly construct the colors array?

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/4dd42317-463c-4b73-bf9c-dbaec428ae2c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


/t

https://tom.ritchford.com

https://tom.swirly.com

INFO - devices - Using COM Port: /dev/ttyACM0, Device ID: 0, Device Ver: 0

WARNING - animation_threading - Frame-time of 33ms set, but took 35ms!

Traceback (most recent call last):

File “/usr/local/bin/bibliopixel”, line 15, in

main.main()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/main/main.py”, line 62, in main

return run(args) or 0

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 25, in run

animation.start()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 151, in start

self.threading.start()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/threads/animation_threading.py”, line 70, in start

self.target()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/threads/animation_threading.py”, line 30, in target

self.run()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 144, in run_all_frames

self.run_one_frame()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 97, in run_one_frame

self.step(self.runner.amt)

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/sequence.py”, line 30, in step

self.current_animation.run_all_frames()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 144, in run_all_frames

self.run_one_frame()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 97, in run_one_frame

self.step(self.runner.amt)

File “/home/pi/.local/lib/python3.5/site-packages/BiblioPixelAnimations/strip/Searchlights.py”, line 35, in step

self._ledcolors[self._currentpos[i]] = map(lambda x, y: (x + y) // 2, self._color[i], self._ledcolors[self._currentpos[i]])

IndexError: list index out of range

The forced reinstall

sudo pip3 install --upgrade --force-reinstall bibliopixel
Successfully installed BiblioPixelAnimations-3.20170913.13846 BiblioPixelTriggers-1.0.1 GitPython-2.1.7 Jinja2-2.10 MarkupSafe-1.0 Werkzeug-0.12.2 beautifulsoup4-4.6.0 bibliopixel-3.3.6 certifi-2017.11.5 chardet-3.0.4 click-6.7 croniter-0.3.20 flask-0.12.2 gitdb2-2.0.3 idna-2.6 itsdangerous-0.24 loady-1.7.4 python-dateutil-2.6.1 requests-2.18.4 six-1.11.0 smmap2-2.0.3 urllib3-1.22

Post reinstall

INFO - devices - Using COM Port: /dev/ttyACM0, Device ID: 0, Device Ver: 0

WARNING - animation_threading - Frame-time of 33ms set, but took 37ms!

Traceback (most recent call last):

File “/usr/local/bin/bp”, line 15, in

main.main()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/main/main.py”, line 62, in main

return run(args) or 0

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 25, in run

animation.start()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 151, i n start

self.threading.start()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/threads/animation_threading.py”, lin e 70, in start

self.target()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/threads/animation_threading.py”, lin e 30, in target

self.run()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 144, i n run_all_frames

self.run_one_frame()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 97, in run_one_frame

self.step(self.runner.amt)

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/sequence.py”, line 30, in step

self.current_animation.run_all_frames()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 144, i n run_all_frames

self.run_one_frame()

File “/home/pi/.local/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 97, in run_one_frame

self.step(self.runner.amt)

File “/home/pi/.local/lib/python3.5/site-packages/BiblioPixelAnimations/strip/Searchlights.py”, li ne 35, in step

self._ledcolors[self._currentpos[i]] = map(lambda x, y: (x + y) // 2, self._color[i], self._ledc olors[self._currentpos[i]])

IndexError: list index out of range

···

Thanks.

I rebooted. I tested PartyMode and it worked. So I then copied the json and made the small edits for Searchlights.
They both work now even with the LED count.

···

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

I didn’t actually write SearchLights. It was a user submission. I can probably take a look tonight and try to clean it up.

···

On Thu, Dec 7, 2017 at 10:35 AM, Peter Strohmeyer p.strohmeyer@gmail.com wrote:

Thanks.

I rebooted. I tested PartyMode and it worked. So I then copied the json and made the small edits for Searchlights.
They both work now even with the LED count.

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/b767aa1d-4017-4421-876f-175f09eb59fb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Isn’t blaming contributors the point of taking source contributions? :wink:

···

On Thu, Dec 7, 2017 at 10:50 AM, Tom Swirly tom@swirly.com wrote:

What good are you if I can’t blame you for things? :smiley:

I’m actually fiddling with it as I like the effect.

Glad it’s working, Peter, but I feel that it’s fragile - I can reproduce failures on it here. So it needs a fix anyway.

On Thu, Dec 7, 2017 at 4:48 PM, Adam Haile adammhaile@gmail.com wrote:

I didn’t actually write SearchLights. It was a user submission. I can probably take a look tonight and try to clean it up.

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAG8g-TZTCRQO6MVu0sCWZrcAiGeNxkJQXqaww%3DGSLexRjPS3QQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


/t

https://tom.ritchford.com

https://tom.swirly.com

On Thu, Dec 7, 2017 at 10:35 AM, Peter Strohmeyer p.strohmeyer@gmail.com wrote:

Thanks.

I rebooted. I tested PartyMode and it worked. So I then copied the json and made the small edits for Searchlights.
They both work now even with the LED count.

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/b767aa1d-4017-4421-876f-175f09eb59fb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

  1. Has been done over a year ago.
  2. Should be interesting (thinking of LightshowPi , definitely try out the example written for the AllPixel)
  3. Simple and on/off could suffice for now (thinking of LighshowPi) I’m ok with 1 animation for the short term as long as it syncs and it’s obvious that it’s addressable LEDs.
···

On Thursday, December 7, 2017 at 1:42:07 PM UTC-7, Tom Swirly wrote:

60 amps of 5,856 RGB LED glory… that’s exciting!

We have ongoing installations of BP that use over 12,000 LEDs so that part is definitely doable. However…

  1. Do you have all this wired and powered already? That’s a serious issue I can’t even address. You have 122 strips…
  1. There are various spectrum analyzer libraries out there, and I’ve been looking into some of them. They will consume some lesser or greater portion of your RPi’s computational power. And you need to learn them.
  1. That GUI might take you quite some time to make work.

It seems really really ambitious given your timeline, I hate to say…

On Thu, Dec 7, 2017 at 7:01 PM, Peter Strohmeyer p.stro...@gmail.com wrote:

@Tom
That would be great for virtualenv

My goal for all of this:

  1. audio in spectrum analyzer output to High, Mid, Low, music visualizer for our LED Dance Floor (12’x16’)
  1. simple GUI to start/stop and possibly select animations, adjust colors (color wheel), speed (amt), & randomness(amt) to match the “mood” / beat of the playlist
  1. run on RPI with the 7" touch screen (I’m not opposed to using any tablets), just that the replacement cost for damage/theft of an RPI w/monitor is relatively cheap

I initially found this last year, https://www.indiegogo.com/projects/the-smartest-music-reactive-led-controller-vivi#/, and pre-ordered two. I then purchased all the lights from Aliexpress, and we built the floor. Sadly, the production stalled, and 2 months of delay has turned into a year. In the mean time, I used an ad-hoc array of dumb LED and sound activated strips placed near a speaker to generally pass-off responsiveness to a bunch drunks (it worked, lol).

Giving up, I decided to make my own. Now diving into the rabbit’s hole, it would seem the ViVi controller is now shipping (I refunded last year so I won’t be getting one). But, I have committed time into this with RPi and plan to complete this for our NYE party.

So, just wanting to see all the animations and familiarizing myself with Bibliopixel, my luck on this project seems to be continuing, c’est la Vie.

PROJECT SPECS:

FLOOR SIZE: 12’ x 16’, reconfigurable with 4’ x 4’ Floor panels

FLOOR PANELS: Floor panels comprise of four ( 2’’ x 2’) Light panel backings

LIGHT PANELS: backings then have 122 LED strips, arranged in a single line concentric square pattern, 12 each clockwise and counterclockwise

TOTAL LIGHTS: 48 (122 LED) strips, 5,856 rgb LEDs

MAX LEDS PER PANEL: 488, 30amps
LED TYPE: WS2812B

POWER: 300W, 5V , 60A

The plan was to have the 3-channels (high, mid, low) output to the 12 floor panels using splitters.

Each channel would be split over 4 floor panels
Use an audio-in splitter, one to RPi, or if I need a separate (PCB or RPi for the spectrum analyzer?) which drives the lights, and the other to the receiver for sound output.

Thoughts/Concerns?

On Thu, Dec 7, 2017 at 9:35 AM, Tom Swirly t...@swirly.com wrote:

Ah, I promised you a tip, Peter.

It has to do with “sudo pip”, which you are using to install packages. I used to do this but then I learned I was in a state of error ;-), and the “sudo” should have told me that.

As was pointed out to me, when I do that with pip, I’m changing the state of my entire system - for all users.

It means that installing one program through pip can break another one, because the first program installed a newer and incompatible version of some library (which was why indeed I was in trouble at that point).

And I didn’t have a clean installation of Python to test against. This means that I sent someone my library, it’s likely there will be dependencies that I missed because you forgot that I installed them at some point.

Learn from my errors. You should instead do everything within a virtualenv. It’s like a clean new Python installation each time. Whenever I start any new project, whenever I just want to evaluate a package, I create a new virtualenv and install exactly what I need in that. I never need to sudo, as virtualenv doesn’t overwrite system resources.

I can easily switch between virtualenvs - right now I have, hah, 21 virtualenvs (should clean up!), which include BP for Python 3.4, BP for Python 3.6, and even a virtualenv for BP2 and Python 2.7. (The fact that I have so many and it never caused me any issues should show how useful they are…)

That’s the tip!

If you wanted to do this, let me know, and I’ll walk you through it.

On Thu, Dec 7, 2017 at 4:51 PM, Adam Haile adamm...@gmail.com wrote:

Isn’t blaming contributors the point of taking source contributions? :wink:

On Thu, Dec 7, 2017 at 10:50 AM, Tom Swirly t...@swirly.com wrote:

What good are you if I can’t blame you for things? :smiley:

I’m actually fiddling with it as I like the effect.

Glad it’s working, Peter, but I feel that it’s fragile - I can reproduce failures on it here. So it needs a fix anyway.

On Thu, Dec 7, 2017 at 4:48 PM, Adam Haile adamm...@gmail.com wrote:

I didn’t actually write SearchLights. It was a user submission. I can probably take a look tonight and try to clean it up.

On Thu, Dec 7, 2017 at 10:35 AM, Peter Strohmeyer p.stro...@gmail.com wrote:

Thanks.

I rebooted. I tested PartyMode and it worked. So I then copied the json and made the small edits for Searchlights.
They both work now even with the LED count.

On Tuesday, December 5, 2017 at 10:11:25 PM UTC-7, Peter Strohmeyer wrote:

I have installed, uninstalled installed BiblioPixel and several of the animations I keep getting an error.

I set RPI3 to use Python3.x (currently Python3.5) as default.
I sudo pip3 install bibliopixel

Collecting bibliopixel

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixel/BiblioPixel-3.3.6-py3-none-any.whl

Collecting BiblioPixelTriggers (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixeltriggers/BiblioPixelTriggers-1.0.1-py3-none-any.whl

Collecting BiblioPixelAnimations (from bibliopixel)

Using cached https://www.piwheels.hostedpi.com/simple/bibliopixelanimations/BiblioPixelAnimations-3.20171123.54201-py3-none-any.whl

Requirement already satisfied: loady in /usr/local/lib/python3.5/dist-packages (from bibliopixel)

Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from bibliopixel)

Requirement already satisfied: croniter in /usr/local/lib/python3.5/dist-packages (from BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from loady->bibliopixel)

Requirement already satisfied: GitPython in /usr/local/lib/python3.5/dist-packages (from loady->bibliopixel)

Requirement already satisfied: python-dateutil in /usr/local/lib/python3.5/dist-packages (from croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from GitPython->loady->bibliopixel)

Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->croniter->BiblioPixelTriggers->bibliopixel)

Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from gitdb2>=2.0.0->GitPython->loady->bibliopixel)

Installing collected packages: BiblioPixelTriggers, BiblioPixelAnimations, bibliopixel

Successfully installed BiblioPixelAnimations-3.20171123.54201 BiblioPixelTriggers-1.0.1 bibliopixel-3.3.6

I run PartyMode.py and keep getting one of two errors

  1. File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip/PartyMode.py”, line 17, in step

self._led.fill(self._colors[self._step / 2], self._start, self._end)

TypeError: list indices must be integers or slices, not float

It appears line 17 division (version of the file is an earlier version) as the division should be // 2, which appears when I look at the file on Github.

Then if I edit the file to match on Github, I get this error

  1. File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in _render

c = [int(level * x) for x in self._colors[i + self._pos]]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/driver_base.py”, line 121, in

c = [int(level * x) for x in self._colors[i + self._pos]]

TypeError: can’t multiply sequence by non-int of type ‘float’

These are all the files in this directory (which is less than on Github)

/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/strip $ ls

Alternates.py ColorChase.py ColorPattern.py FireFlies.py hexclock.py LarsonScanners.py PartyMode.py pycache RGBClock.py Wave.py

BinaryEpochClock.py ColorFade.py ColorWipe.py HalvesRainbow.py init.py LinearRainbow.py PixelPingPong.py Rainbows.py Searchlights.py WhiteTwinkle.py

It feels like something is not installed correctly. I have successfully run Alternates, ColorChase, LarsonScanners, Rainbows

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/b767aa1d-4017-4421-876f-175f09eb59fb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAG8g-TZTCRQO6MVu0sCWZrcAiGeNxkJQXqaww%3DGSLexRjPS3QQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


/t

https://tom.ritchford.com

https://tom.swirly.com