5x3 neopixel Matrix

Hi Tom.
After going “bp -v animated-gif.yml”

I get the following :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 7 8, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 16 5, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 14 1, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65 , in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 3 1, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in fix

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 8, in fix

assert isinstance(d, (int, float, bool, str))

AssertionError

Please don’t remove the user group from responses. It’s better to keep everything on the forum :slight_smile:

You need to follow the directions here: https://github.com/ManiacalLabs/BiblioPixel/wiki/PiWS281X

Then you need to add the following to your yml file:

driver:

typename: pi_ws281x

num: 42 #or however many pixels you have
···

On Thu, May 31, 2018 at 11:19 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Previously, I used the rpi_ws281x library, where you have a config file to specify matrix dimensions, data pin, etc.

I know nothing about this library (but seems to be the most capable one)
Started this chain asking for a tutorial or something to get my first proyect running.
I know you guys are super busy getting that done, I would love to wait for it but I got a deadline on this proyect and I really pushed hard to get it done with raspy and bibliopixel.

Is there any chance you can send me a
commented,

generic, “Hello world” .json proyect, to figure it out ?? I also need to know how to call it from terminal, and how to include the “yml” file in it so it all works just fine.

The only objective is to get this small matrix to play a 5x3 gif that i already made (I understand gif resolution must be the same as matrix dimensions)

Once this is running I can move to the actual 10 x 10 matrix that im already building to finish this proyect.

We are almost there guys !


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 6:00 GMT-03:00 Tom Swirly tom@swirly.com:

All of those messages are fine.

Did you give me the whole project?

You aren’t specifying a driver, so it’ll be using the SimPixel simulator that displays the lights on a browser. If you want to have the web page pop up, use the -s flag, so

bp -vs your-project.json

You should try that to see results - but my theory is that the issue is that you didn’t specify a driver…

On Thu, May 31, 2018 at 10:50 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Sorry Tom, bad directory skills. Now i got the correct path, executed the yml and this is what i got in the console, with no leds blinking.

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /home/pi/Desktop/test-led-3x5.gif …

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

WARNING - deprecated - layout.setBuffer


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 5:46 GMT-03:00 Nicolas Yacovone nicolasyacovone@gmail.com:

Oh i see.
Mea Culpa, I thought you were just quicly writing previous email, so I switched spaces to tabs.
Got it running (no execution errors). Still, somethings wrong with the path of my .gif file.
Its located on the Raspi´s Desktop. I double checked file name in the script, even copy pasted it.

Does it have to be located in a specific directory ? Here is what i got:

bp -v animated-gif.yml

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /Desktp/test-led-3x5.gif …

ERROR - failed - Unable to create animation for {‘imagePath’: ‘/Desktp/test-led-3x5.gif’}

ERROR - failed -

Traceback (most recent call last):

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/animation/animation.py”, line 20, in construct

a = cls(project.layout, **desc)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 163, in init

self.loadGIFFile(self.imagePath)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 187, in loadGIFFile

self._image_buffers[next_buf] = _loadGIFSequence(gif, self.layout, self._bgcolor, self._bright, self._offset)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 69, in _loadGIFSequence

img = Image.open(imagePath)

File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 2312, in open

fp = builtins.open(filename, “rb”)

FileNotFoundError: [Errno 2] No such file or directory: ‘/Desktp/test-led-3x5.gif’

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

^CDEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> stop called

DEBUG - animation_threading - Animation complete

DEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> finishes run()

INFO - run - Received signal SIGINT

2018-05-31 5:19 GMT-03:00 Tom Swirly tom@swirly.com:

Ah, that’s unfortunate - I didn’t know this was an issue!

You have a “tab” character in the file. Apparently Yaml doesn’t accept those.

Try replacing it with two spaces…

On Thu, May 31, 2018 at 9:47 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Thanks for your patience Tom. I really apreciate the support !
My matrix data cable is connected to GPIO BOARD pin 13 wich is GPIO pcm 18 on a raspberry pi 3 B model.

I fixed the code applying indent corrections, and I got this back :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65, in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 31, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/yaml/init.py”, line 72, in load

return loader.get_single_data()

File “/usr/local/lib/python3.5/dist-packages/yaml/constructor.py”, line 35, in get_single_data

node = self.get_single_node()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 36, in ge t_single_node

document = self.compose_document()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 55, in co mpose_document

node = self.compose_node(None, None)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 84, in compose_node

node = self.compose_mapping_node(anchor)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 133, in compose_mapping_node

item_value = self.compose_node(node, item_key)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 64, in compose_node

if self.check_event(AliasEvent):

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 98, in check_event

self.current_event = self.state()

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 449, in par se_block_mapping_value

if not self.check_token(KeyToken, ValueToken, BlockEndToken):

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 116, in check_token

self.fetch_more_tokens()

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 257, in fe tch_more_tokens

self.get_mark())

yaml.scanner.ScannerError: while scanning for the next token

found character ‘\t’ that cannot start any token

in “”, line 4, column 1:

fps: 30

^


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 4:09 GMT-03:00 Tom Swirly tom@swirly.com:

Aha!

The Yaml needs to be indented properly. “fps” is part of the “run” section, so it needs to be indented.

Like this:

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif

On Thu, May 31, 2018 at 1:08 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Do you mean the original script ?

Here it is :

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-30 19:00 GMT-03:00 Tom Swirly tom@swirly.com:

Hello! Interesting error!

Can I see the original document please? There’s an entry in it that’s the wrong type…

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/CAOuQWfVUO5Z2fYVcuFE%3DHG711kDSaXA1083MHReutSXMhUjsGw%40mail.gmail.com.

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

On Wed, May 30, 2018 at 9:58 PM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Hi Tom.
After going “bp -v animated-gif.yml”

I get the following :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 7 8, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 16 5, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 14 1, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65 , in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 3 1, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in fix

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 8, in fix

assert isinstance(d, (int, float, bool, str))

AssertionError

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/CALUdgjq54nbmJy51ThksDV600Rjy6P2Y-OgWpK3nDv2Rswkpsg%40mail.gmail.com.

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

/t

https://tom.ritchford.com

https://tom.swirly.com

Sorry about the user group.
I updated the driver on the yml file after following the instructions linked.
I got this :

bp -v -s animated-gif.yml

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 68, in _get_projects

project = common_flags.make_project(args, desc, root_file)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/common_flags.py”, line 174, in make_project return project.project(desc, project_flags, root_file=root_file)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 134, in project

project = construct.construct(**desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/construct.py”, line 13, in construct

return datatype(*args, **kwds)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 44, in init

self.drivers = [create(d, ‘drivers’) for d in drivers]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 44, in

self.drivers = [create(d, ‘drivers’) for d in drivers]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 38, in create

python_path=‘bibliopixel.’ + name)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/recurse.py”, line 73, in recurse

return call(post, desc) or desc

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/recurse.py”, line 43, in call

return f and f(desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”, line 30, in post

return self.construct_child(**desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”, line 19, in construct_child

return construct(self, **kwds)

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

return cls(maker=project.maker, **desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/PiWS281X.py”,line 98, in init

raise ValueError(WS_ERROR)

ValueError: (‘Unable to create drivers’, '\nPiWS281X Requires the rpi_ws281x C e xtension.\n\nInstall rpi_ws281x with the following shell commands:\n\n git clone https://github.com/jgarff/rpi_ws281x.git\n cd rpi_ws281x\n\n sudo apt- get install python-dev swig scons\n sudo scons\n\n cd python\n # If using default system python3\n sudo python3 setup.py build install\n

If using virtualenv, enter env then run\n python setup.py build install\n’)

Tried to install all that but console asks for github user

···

2018-05-31 7:58 GMT-03:00 Adam Haile adammhaile@gmail.com:

Please don’t remove the user group from responses. It’s better to keep everything on the forum :slight_smile:

You need to follow the directions here: https://github.com/ManiacalLabs/BiblioPixel/wiki/PiWS281X

Then you need to add the following to your yml file:

driver:

typename: pi_ws281x

num: 42 #or however many pixels you have

On Thu, May 31, 2018 at 5:57 AM Tom Swirly tom@swirly.com wrote:

The project you have is perfectly complete - you just need to have the right driver setting to see it on your hardware.

First - did you try running that project with the -s flag? This will at least let you see the simulator so you can be sure it’s actually running.

Now, second, in order to specify the driver we need to know a little more.

You have WS281x lights, yes - so how are they connected to your machine?

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/CAOuQWfWjVaF8WfhkvKAdgGt%3DennnnhOQpbYh0av7tFmrynWicQ%40mail.gmail.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-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAG8g-TZSsp0pz6AyqNZs1rN0BozJpE%2BT-OiQAkZJtGnOxgT5xw%40mail.gmail.com.

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

On Thu, May 31, 2018 at 11:19 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Previously, I used the rpi_ws281x library, where you have a config file to specify matrix dimensions, data pin, etc.

I know nothing about this library (but seems to be the most capable one)
Started this chain asking for a tutorial or something to get my first proyect running.
I know you guys are super busy getting that done, I would love to wait for it but I got a deadline on this proyect and I really pushed hard to get it done with raspy and bibliopixel.

Is there any chance you can send me a
commented,

generic, “Hello world” .json proyect, to figure it out ?? I also need to know how to call it from terminal, and how to include the “yml” file in it so it all works just fine.

The only objective is to get this small matrix to play a 5x3 gif that i already made (I understand gif resolution must be the same as matrix dimensions)

Once this is running I can move to the actual 10 x 10 matrix that im already building to finish this proyect.

We are almost there guys !


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 6:00 GMT-03:00 Tom Swirly tom@swirly.com:

All of those messages are fine.

Did you give me the whole project?

You aren’t specifying a driver, so it’ll be using the SimPixel simulator that displays the lights on a browser. If you want to have the web page pop up, use the -s flag, so

bp -vs your-project.json

You should try that to see results - but my theory is that the issue is that you didn’t specify a driver…

On Thu, May 31, 2018 at 10:50 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Sorry Tom, bad directory skills. Now i got the correct path, executed the yml and this is what i got in the console, with no leds blinking.

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /home/pi/Desktop/test-led-3x5.gif …

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

WARNING - deprecated - layout.setBuffer


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 5:46 GMT-03:00 Nicolas Yacovone nicolasyacovone@gmail.com:

Oh i see.
Mea Culpa, I thought you were just quicly writing previous email, so I switched spaces to tabs.
Got it running (no execution errors). Still, somethings wrong with the path of my .gif file.
Its located on the Raspi´s Desktop. I double checked file name in the script, even copy pasted it.

Does it have to be located in a specific directory ? Here is what i got:

bp -v animated-gif.yml

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /Desktp/test-led-3x5.gif …

ERROR - failed - Unable to create animation for {‘imagePath’: ‘/Desktp/test-led-3x5.gif’}

ERROR - failed -

Traceback (most recent call last):

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/animation/animation.py”, line 20, in construct

a = cls(project.layout, **desc)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 163, in init

self.loadGIFFile(self.imagePath)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 187, in loadGIFFile

self._image_buffers[next_buf] = _loadGIFSequence(gif, self.layout, self._bgcolor, self._bright, self._offset)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 69, in _loadGIFSequence

img = Image.open(imagePath)

File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 2312, in open

fp = builtins.open(filename, “rb”)

FileNotFoundError: [Errno 2] No such file or directory: ‘/Desktp/test-led-3x5.gif’

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

^CDEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> stop called

DEBUG - animation_threading - Animation complete

DEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> finishes run()

INFO - run - Received signal SIGINT

2018-05-31 5:19 GMT-03:00 Tom Swirly tom@swirly.com:

Ah, that’s unfortunate - I didn’t know this was an issue!

You have a “tab” character in the file. Apparently Yaml doesn’t accept those.

Try replacing it with two spaces…

On Thu, May 31, 2018 at 9:47 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Thanks for your patience Tom. I really apreciate the support !
My matrix data cable is connected to GPIO BOARD pin 13 wich is GPIO pcm 18 on a raspberry pi 3 B model.

I fixed the code applying indent corrections, and I got this back :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65, in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 31, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/yaml/init.py”, line 72, in load

return loader.get_single_data()

File “/usr/local/lib/python3.5/dist-packages/yaml/constructor.py”, line 35, in get_single_data

node = self.get_single_node()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 36, in ge t_single_node

document = self.compose_document()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 55, in co mpose_document

node = self.compose_node(None, None)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 84, in compose_node

node = self.compose_mapping_node(anchor)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 133, in compose_mapping_node

item_value = self.compose_node(node, item_key)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 64, in compose_node

if self.check_event(AliasEvent):

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 98, in check_event

self.current_event = self.state()

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 449, in par se_block_mapping_value

if not self.check_token(KeyToken, ValueToken, BlockEndToken):

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 116, in check_token

self.fetch_more_tokens()

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 257, in fe tch_more_tokens

self.get_mark())

yaml.scanner.ScannerError: while scanning for the next token

found character ‘\t’ that cannot start any token

in “”, line 4, column 1:

fps: 30

^


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 4:09 GMT-03:00 Tom Swirly tom@swirly.com:

Aha!

The Yaml needs to be indented properly. “fps” is part of the “run” section, so it needs to be indented.

Like this:

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif

On Thu, May 31, 2018 at 1:08 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Do you mean the original script ?

Here it is :

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-30 19:00 GMT-03:00 Tom Swirly tom@swirly.com:

Hello! Interesting error!

Can I see the original document please? There’s an entry in it that’s the wrong type…

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/CAOuQWfVUO5Z2fYVcuFE%3DHG711kDSaXA1083MHReutSXMhUjsGw%40mail.gmail.com.

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

On Wed, May 30, 2018 at 9:58 PM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Hi Tom.
After going “bp -v animated-gif.yml”

I get the following :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 7 8, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 16 5, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 14 1, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65 , in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 3 1, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in fix

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 8, in fix

assert isinstance(d, (int, float, bool, str))

AssertionError

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/CALUdgjq54nbmJy51ThksDV600Rjy6P2Y-OgWpK3nDv2Rswkpsg%40mail.gmail.com.

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

/t

https://tom.ritchford.com

https://tom.swirly.com

The instructions in that error are the same as in the link I sent you. Shouldn’t require a github account. Can you please include the commands you tried and their output so I can see what’s happening?

also, please send the output of pip3 freeze

···

2018-05-31 7:58 GMT-03:00 Adam Haile adammhaile@gmail.com:

Please don’t remove the user group from responses. It’s better to keep everything on the forum :slight_smile:

You need to follow the directions here: https://github.com/ManiacalLabs/BiblioPixel/wiki/PiWS281X

Then you need to add the following to your yml file:

driver:

typename: pi_ws281x

num: 42 #or however many pixels you have

On Thu, May 31, 2018 at 5:57 AM Tom Swirly tom@swirly.com wrote:

The project you have is perfectly complete - you just need to have the right driver setting to see it on your hardware.

First - did you try running that project with the -s flag? This will at least let you see the simulator so you can be sure it’s actually running.

Now, second, in order to specify the driver we need to know a little more.

You have WS281x lights, yes - so how are they connected to your machine?

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/CAOuQWfWjVaF8WfhkvKAdgGt%3DennnnhOQpbYh0av7tFmrynWicQ%40mail.gmail.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-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAG8g-TZSsp0pz6AyqNZs1rN0BozJpE%2BT-OiQAkZJtGnOxgT5xw%40mail.gmail.com.

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

On Thu, May 31, 2018 at 11:19 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Previously, I used the rpi_ws281x library, where you have a config file to specify matrix dimensions, data pin, etc.

I know nothing about this library (but seems to be the most capable one)
Started this chain asking for a tutorial or something to get my first proyect running.
I know you guys are super busy getting that done, I would love to wait for it but I got a deadline on this proyect and I really pushed hard to get it done with raspy and bibliopixel.

Is there any chance you can send me a
commented,

generic, “Hello world” .json proyect, to figure it out ?? I also need to know how to call it from terminal, and how to include the “yml” file in it so it all works just fine.

The only objective is to get this small matrix to play a 5x3 gif that i already made (I understand gif resolution must be the same as matrix dimensions)

Once this is running I can move to the actual 10 x 10 matrix that im already building to finish this proyect.

We are almost there guys !


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 6:00 GMT-03:00 Tom Swirly tom@swirly.com:

All of those messages are fine.

Did you give me the whole project?

You aren’t specifying a driver, so it’ll be using the SimPixel simulator that displays the lights on a browser. If you want to have the web page pop up, use the -s flag, so

bp -vs your-project.json

You should try that to see results - but my theory is that the issue is that you didn’t specify a driver…

On Thu, May 31, 2018 at 10:50 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Sorry Tom, bad directory skills. Now i got the correct path, executed the yml and this is what i got in the console, with no leds blinking.

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /home/pi/Desktop/test-led-3x5.gif …

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

WARNING - deprecated - layout.setBuffer


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 5:46 GMT-03:00 Nicolas Yacovone nicolasyacovone@gmail.com:

Oh i see.
Mea Culpa, I thought you were just quicly writing previous email, so I switched spaces to tabs.
Got it running (no execution errors). Still, somethings wrong with the path of my .gif file.
Its located on the Raspi´s Desktop. I double checked file name in the script, even copy pasted it.

Does it have to be located in a specific directory ? Here is what i got:

bp -v animated-gif.yml

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /Desktp/test-led-3x5.gif …

ERROR - failed - Unable to create animation for {‘imagePath’: ‘/Desktp/test-led-3x5.gif’}

ERROR - failed -

Traceback (most recent call last):

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/animation/animation.py”, line 20, in construct

a = cls(project.layout, **desc)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 163, in init

self.loadGIFFile(self.imagePath)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 187, in loadGIFFile

self._image_buffers[next_buf] = _loadGIFSequence(gif, self.layout, self._bgcolor, self._bright, self._offset)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 69, in _loadGIFSequence

img = Image.open(imagePath)

File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 2312, in open

fp = builtins.open(filename, “rb”)

FileNotFoundError: [Errno 2] No such file or directory: ‘/Desktp/test-led-3x5.gif’

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

^CDEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> stop called

DEBUG - animation_threading - Animation complete

DEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> finishes run()

INFO - run - Received signal SIGINT

2018-05-31 5:19 GMT-03:00 Tom Swirly tom@swirly.com:

Ah, that’s unfortunate - I didn’t know this was an issue!

You have a “tab” character in the file. Apparently Yaml doesn’t accept those.

Try replacing it with two spaces…

On Thu, May 31, 2018 at 9:47 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Thanks for your patience Tom. I really apreciate the support !
My matrix data cable is connected to GPIO BOARD pin 13 wich is GPIO pcm 18 on a raspberry pi 3 B model.

I fixed the code applying indent corrections, and I got this back :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65, in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 31, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/yaml/init.py”, line 72, in load

return loader.get_single_data()

File “/usr/local/lib/python3.5/dist-packages/yaml/constructor.py”, line 35, in get_single_data

node = self.get_single_node()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 36, in ge t_single_node

document = self.compose_document()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 55, in co mpose_document

node = self.compose_node(None, None)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 84, in compose_node

node = self.compose_mapping_node(anchor)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 133, in compose_mapping_node

item_value = self.compose_node(node, item_key)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 64, in compose_node

if self.check_event(AliasEvent):

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 98, in check_event

self.current_event = self.state()

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 449, in par se_block_mapping_value

if not self.check_token(KeyToken, ValueToken, BlockEndToken):

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 116, in check_token

self.fetch_more_tokens()

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 257, in fe tch_more_tokens

self.get_mark())

yaml.scanner.ScannerError: while scanning for the next token

found character ‘\t’ that cannot start any token

in “”, line 4, column 1:

fps: 30

^


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 4:09 GMT-03:00 Tom Swirly tom@swirly.com:

Aha!

The Yaml needs to be indented properly. “fps” is part of the “run” section, so it needs to be indented.

Like this:

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif

On Thu, May 31, 2018 at 1:08 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Do you mean the original script ?

Here it is :

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-30 19:00 GMT-03:00 Tom Swirly tom@swirly.com:

Hello! Interesting error!

Can I see the original document please? There’s an entry in it that’s the wrong type…

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/CAOuQWfVUO5Z2fYVcuFE%3DHG711kDSaXA1083MHReutSXMhUjsGw%40mail.gmail.com.

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

On Wed, May 30, 2018 at 9:58 PM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Hi Tom.
After going “bp -v animated-gif.yml”

I get the following :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 7 8, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 16 5, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 14 1, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65 , in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 3 1, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in fix

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 8, in fix

assert isinstance(d, (int, float, bool, str))

AssertionError

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/CALUdgjq54nbmJy51ThksDV600Rjy6P2Y-OgWpK3nDv2Rswkpsg%40mail.gmail.com.

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

/t

https://tom.ritchford.com

https://tom.swirly.com

Adam, I noticed that the instructions in the link dont use “/n” like the error specifies.

-first command and output :

git clone https://github.com/jgarff/rpi_ws281x.git\n

Cloning into ‘rpi_ws281x.gitn’…

Username for ‘https://github.com’:

-pip3 freeze output :

automationhat==0.1.0

beautifulsoup4==4.6.0

BiblioPixel==3.4.18

BiblioPixelAnimations==3.20180419.113700

BiblioPixelTriggers==1.0.2

blinker==1.3

blinkt==0.1.1

buttonshim==0.0.2

Cap1xxx==0.1.3

chardet==2.3.0

click==6.6

colorama==0.3.7

croniter==0.3.23

cryptography==1.7.1

drumhat==0.1.0

enum34==1.1.6

envirophat==1.0.0

ExplorerHAT==0.4.2

Flask==0.12.1

fourletterphat==0.1.0

gitdb2==2.0.3

GitPython==2.1.10

gpiozero==1.4.1

idna==2.2

itsdangerous==0.24

iwlib==1.5

jedi==0.10.2

Jinja2==2.8

jsonpickle==0.9.6

keyring==10.1

keyrings.alt==1.3

loady==1.8.9

MarkupSafe==0.23

mcpi==0.1.1

microdotphat==0.2.1

mote==0.0.3

motephat==0.0.2

myDevices==2.0.0

netifaces==0.10.7

numpy==1.12.1

oauthlib==2.0.1

paho-mqtt==1.3.1

pantilthat==0.0.5

pgzero==1.2

phatbeat==0.1.0

pianohat==0.1.0

picamera==1.13

picraft==1.0

piglow==1.2.4

pigpio==1.38

Pillow==4.0.0

psutil==5.4.5

pyasn1==0.1.9

pycrypto==2.6.1

pygame==1.9.3

pygobject==3.22.0

pyinotify==0.9.6

PyJWT==1.4.2

pyOpenSSL==16.2.0

pyserial==3.2.1

python-apt==1.1.0b5

python-dateutil==2.7.3

pyxdg==0.25

PyYAML==3.12

rainbowhat==0.0.2

requests==2.12.4

requests-oauthlib==0.7.0

RPi.GPIO==0.6.3

RTIMULib==7.2.1

scrollphat==0.0.7

scrollphathd==1.2.1

SecretStorage==2.3.1

sense-emu==1.0

sense-hat==2.2.0

simplejson==3.10.0

six==1.10.0

skywriter==0.0.7

smmap2==2.0.3

sn3218==1.2.7

spidev==3.3

thonny==2.1.16

touchphat==0.0.1

twython==3.4.0

unicornhathd==0.0.3

urllib3==1.19.1

Werkzeug==0.11.15

···

2018-05-31 17:53 GMT-03:00 Adam Haile adammhaile@gmail.com:

The instructions in that error are the same as in the link I sent you. Shouldn’t require a github account. Can you please include the commands you tried and their output so I can see what’s happening?

also, please send the output of pip3 freeze

On Thu, May 31, 2018 at 4:50 PM Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Sorry about the user group.
I updated the driver on the yml file after following the instructions linked.
I got this :

bp -v -s animated-gif.yml

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 68, in _get_projects

project = common_flags.make_project(args, desc, root_file)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/common_flags.py”, line 174, in make_project return project.project(desc, project_flags, root_file=root_file)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 134, in project

project = construct.construct(**desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/construct.py”, line 13, in construct

return datatype(*args, **kwds)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 44, in init

self.drivers = [create(d, ‘drivers’) for d in drivers]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 44, in

self.drivers = [create(d, ‘drivers’) for d in drivers]

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”,line 38, in create

python_path=‘bibliopixel.’ + name)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/recurse.py”, line 73, in recurse

return call(post, desc) or desc

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/recurse.py”, line 43, in call

return f and f(desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”, line 30, in post

return self.construct_child(**desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/project/project.py”, line 19, in construct_child

return construct(self, **kwds)

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

return cls(maker=project.maker, **desc)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/drivers/PiWS281X.py”,line 98, in init

raise ValueError(WS_ERROR)

ValueError: (‘Unable to create drivers’, '\nPiWS281X Requires the rpi_ws281x C e xtension.\n\nInstall rpi_ws281x with the following shell commands:\n\n git clone https://github.com/jgarff/rpi_ws281x.git\n cd rpi_ws281x\n\n sudo apt- get install python-dev swig scons\n sudo scons\n\n cd python\n # If using default system python3\n sudo python3 setup.py build install\n

If using virtualenv, enter env then run\n python setup.py build install\n’)

Tried to install all that but console asks for github user

2018-05-31 7:58 GMT-03:00 Adam Haile adammhaile@gmail.com:

Please don’t remove the user group from responses. It’s better to keep everything on the forum :slight_smile:

You need to follow the directions here: https://github.com/ManiacalLabs/BiblioPixel/wiki/PiWS281X

Then you need to add the following to your yml file:

driver:

typename: pi_ws281x

num: 42 #or however many pixels you have

On Thu, May 31, 2018 at 5:57 AM Tom Swirly tom@swirly.com wrote:

The project you have is perfectly complete - you just need to have the right driver setting to see it on your hardware.

First - did you try running that project with the -s flag? This will at least let you see the simulator so you can be sure it’s actually running.

Now, second, in order to specify the driver we need to know a little more.

You have WS281x lights, yes - so how are they connected to your machine?

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/CAOuQWfWjVaF8WfhkvKAdgGt%3DennnnhOQpbYh0av7tFmrynWicQ%40mail.gmail.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-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/CAG8g-TZSsp0pz6AyqNZs1rN0BozJpE%2BT-OiQAkZJtGnOxgT5xw%40mail.gmail.com.

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

On Thu, May 31, 2018 at 11:19 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Previously, I used the rpi_ws281x library, where you have a config file to specify matrix dimensions, data pin, etc.

I know nothing about this library (but seems to be the most capable one)
Started this chain asking for a tutorial or something to get my first proyect running.
I know you guys are super busy getting that done, I would love to wait for it but I got a deadline on this proyect and I really pushed hard to get it done with raspy and bibliopixel.

Is there any chance you can send me a
commented,

generic, “Hello world” .json proyect, to figure it out ?? I also need to know how to call it from terminal, and how to include the “yml” file in it so it all works just fine.

The only objective is to get this small matrix to play a 5x3 gif that i already made (I understand gif resolution must be the same as matrix dimensions)

Once this is running I can move to the actual 10 x 10 matrix that im already building to finish this proyect.

We are almost there guys !


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 6:00 GMT-03:00 Tom Swirly tom@swirly.com:

All of those messages are fine.

Did you give me the whole project?

You aren’t specifying a driver, so it’ll be using the SimPixel simulator that displays the lights on a browser. If you want to have the web page pop up, use the -s flag, so

bp -vs your-project.json

You should try that to see results - but my theory is that the issue is that you didn’t specify a driver…

On Thu, May 31, 2018 at 10:50 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Sorry Tom, bad directory skills. Now i got the correct path, executed the yml and this is what i got in the console, with no leds blinking.

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /home/pi/Desktop/test-led-3x5.gif …

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

WARNING - deprecated - layout.setBuffer


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 5:46 GMT-03:00 Nicolas Yacovone nicolasyacovone@gmail.com:

Oh i see.
Mea Culpa, I thought you were just quicly writing previous email, so I switched spaces to tabs.
Got it running (no execution errors). Still, somethings wrong with the path of my .gif file.
Its located on the Raspi´s Desktop. I double checked file name in the script, even copy pasted it.

Does it have to be located in a specific directory ? Here is what i got:

bp -v animated-gif.yml

INFO - matrix - Auto generating coordinate map. Use make_matrix_coord_map directly if more control needed.

INFO - ImageAnim - Loading /Desktp/test-led-3x5.gif …

ERROR - failed - Unable to create animation for {‘imagePath’: ‘/Desktp/test-led-3x5.gif’}

ERROR - failed -

Traceback (most recent call last):

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/animation/animation.py”, line 20, in construct

a = cls(project.layout, **desc)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 163, in init

self.loadGIFFile(self.imagePath)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 187, in loadGIFFile

self._image_buffers[next_buf] = _loadGIFSequence(gif, self.layout, self._bgcolor, self._bright, self._offset)

File “/usr/local/lib/python3.5/dist-packages/BiblioPixelAnimations/matrix/ImageAnim.py”, line 69, in _loadGIFSequence

img = Image.open(imagePath)

File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 2312, in open

fp = builtins.open(filename, “rb”)

FileNotFoundError: [Errno 2] No such file or directory: ‘/Desktp/test-led-3x5.gif’

DEBUG - run - Running file animated-gif.yml

INFO - websocket - Starting WebSocket server thread…

DEBUG - animation_threading - Animation starts on main thread

^CDEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> stop called

DEBUG - animation_threading - Animation complete

DEBUG - project - Project <bibliopixel.project.project.Project object at 0x76994130> finishes run()

INFO - run - Received signal SIGINT

2018-05-31 5:19 GMT-03:00 Tom Swirly tom@swirly.com:

Ah, that’s unfortunate - I didn’t know this was an issue!

You have a “tab” character in the file. Apparently Yaml doesn’t accept those.

Try replacing it with two spaces…

On Thu, May 31, 2018 at 9:47 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Thanks for your patience Tom. I really apreciate the support !
My matrix data cable is connected to GPIO BOARD pin 13 wich is GPIO pcm 18 on a raspberry pi 3 B model.

I fixed the code applying indent corrections, and I got this back :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 78, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 165, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 141, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65, in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 31, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/yaml/init.py”, line 72, in load

return loader.get_single_data()

File “/usr/local/lib/python3.5/dist-packages/yaml/constructor.py”, line 35, in get_single_data

node = self.get_single_node()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 36, in ge t_single_node

document = self.compose_document()

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 55, in co mpose_document

node = self.compose_node(None, None)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 84, in compose_node

node = self.compose_mapping_node(anchor)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 133, in compose_mapping_node

item_value = self.compose_node(node, item_key)

File “/usr/local/lib/python3.5/dist-packages/yaml/composer.py”, line 64, in compose_node

if self.check_event(AliasEvent):

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 98, in check_event

self.current_event = self.state()

File “/usr/local/lib/python3.5/dist-packages/yaml/parser.py”, line 449, in par se_block_mapping_value

if not self.check_token(KeyToken, ValueToken, BlockEndToken):

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 116, in check_token

self.fetch_more_tokens()

File “/usr/local/lib/python3.5/dist-packages/yaml/scanner.py”, line 257, in fe tch_more_tokens

self.get_mark())

yaml.scanner.ScannerError: while scanning for the next token

found character ‘\t’ that cannot start any token

in “”, line 4, column 1:

fps: 30

^


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-31 4:09 GMT-03:00 Tom Swirly tom@swirly.com:

Aha!

The Yaml needs to be indented properly. “fps” is part of the “run” section, so it needs to be indented.

Like this:

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif

On Thu, May 31, 2018 at 1:08 AM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Do you mean the original script ?

Here it is :

shape: [5, 3]

run:

fps: 30

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath: /Desktp/test-led 3x5.gif


/t

https://tom.ritchford.com

https://tom.swirly.com

2018-05-30 19:00 GMT-03:00 Tom Swirly tom@swirly.com:

Hello! Interesting error!

Can I see the original document please? There’s an entry in it that’s the wrong type…

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/CAOuQWfVUO5Z2fYVcuFE%3DHG711kDSaXA1083MHReutSXMhUjsGw%40mail.gmail.com.

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

On Wed, May 30, 2018 at 9:58 PM, Nicolas Yacovone nicolasyacovone@gmail.com wrote:

Hi Tom.
After going “bp -v animated-gif.yml”

I get the following :

Traceback (most recent call last):

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

main.main()

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/main.py”, line 7 8, in main

result = run(args) or 0

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 16 5, in run

run_once(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 14 1, in run_once

projects = _get_projects(args)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/main/run.py”, line 65 , in _get_projects

desc = json.loads(desc, filename)

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 3 1, in loads

return fix(yaml.load(s))

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in fix

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 5, in

return {str(k): fix(v) for k, v in d.items()}

File “/usr/local/lib/python3.5/dist-packages/bibliopixel/util/json.py”, line 2 8, in fix

assert isinstance(d, (int, float, bool, str))

AssertionError

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/CALUdgjq54nbmJy51ThksDV600Rjy6P2Y-OgWpK3nDv2Rswkpsg%40mail.gmail.com.

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

/t

https://tom.ritchford.com

https://tom.swirly.com