I ran my test a dozen times or so with verbose logging and got the following traces.
···
==============================================
DEBUG - devices - Error getting device_id for /dev/ttyACM0, 921600
INFO - devices - Using COM Port: /dev/ttyACM1, Device ID: 1, Device Ver: 0
DEBUG - run - Running file stress_test_dev1.json
DEBUG - animation_threading - Animation starts on main thread
WARNING - animation_threading - Frame-time of 33ms set, but took 35ms!
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/serial/serialposix.py”, line 501, in read
'device reports readiness to read but returned no data ’
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 165, in run_context
yield
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 176, in run_all_frames
self.run_one_frame()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 133, in run_one_frame
self.layout.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 106, in push_to_driver
self.threading.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 93, in push_to_driver
self.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 83, in update_colors
d.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/driver_base.py”, line 123, in update_colors
self._send_packet()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/serial/driver.py”, line 129, in _send_packet
resp = self._com.read(1)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/serial/serialposix.py”, line 509, in read
raise SerialException(‘read failed: {}’.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/bin/bp”, line 15, in
main.main()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/main.py”, line 84, in main
return run(args) or 0
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 136, in run
_run_animations(animations, args.pause, args.name)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 112, in _run_animations
animation.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 186, in start
self.threading.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 70, in start
self.target()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 30, in target
self.run()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 176, in run_all_frames
self.run_one_frame()
File “/usr/lib/python3.5/contextlib.py”, line 77, in exit
self.gen.throw(type, value, traceback)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 167, in run_context
self.cleanup(clean_layout)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 89, in cleanup
self.layout.cleanup()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 73, in cleanup
self.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 106, in push_to_driver
self.threading.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 93, in push_to_driver
self.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 83, in update_colors
d.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/driver_base.py”, line 123, in update_colors
self._send_packet()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/serial/driver.py”, line 131, in _send_packet
self.devices.error(fail=False)
TypeError: error() got an unexpected keyword argument ‘fail’
==============================================
INFO - devices - Using COM Port: /dev/ttyACM1, Device ID: 1, Device Ver: 0
DEBUG - run - Running file stress_test_dev1.json
DEBUG - animation_threading - Animation starts on main thread
WARNING - animation_threading - Frame-time of 33ms set, but took 58ms!
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/bin/bp”, line 15, in
main.main()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/main.py”, line 84, in main
return run(args) or 0
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 136, in run
_run_animations(animations, args.pause, args.name)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 112, in _run_animations
animation.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 186, in start
self.threading.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 70, in start
self.target()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 30, in target
self.run()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 176, in run_all_frames
self.run_one_frame()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 133, in run_one_frame
self.layout.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 106, in push_to_driver
self.threading.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 93, in push_to_driver
self.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 83, in update_colors
d.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/driver_base.py”, line 123, in update_colors
self._send_packet()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/serial/driver.py”, line 131, in _send_packet
self.devices.error(fail=False)
TypeError: error() got an unexpected keyword argument ‘fail’
==============================================
INFO - devices - Using COM Port: /dev/ttyACM0, Device ID: 2, Device Ver: 0
DEBUG - run - Running file stress_test_dev2.json
DEBUG - animation_threading - Animation starts on main thread
WARNING - animation_threading - Frame-time of 33ms set, but took 35ms!
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/serial/serialposix.py”, line 501, in read
'device reports readiness to read but returned no data ’
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 165, in run_context
yield
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 176, in run_all_frames
self.run_one_frame()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 133, in run_one_frame
self.layout.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 106, in push_to_driver
self.threading.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 93, in push_to_driver
self.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 83, in update_colors
d.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/driver_base.py”, line 123, in update_colors
self._send_packet()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/serial/driver.py”, line 129, in _send_packet
resp = self._com.read(1)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/serial/serialposix.py”, line 509, in read
raise SerialException(‘read failed: {}’.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/pi/.virtualenvs/playroom_lighting/bin/bp”, line 15, in
main.main()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/main.py”, line 84, in main
return run(args) or 0
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 136, in run
_run_animations(animations, args.pause, args.name)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/main/run.py”, line 112, in _run_animations
animation.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 186, in start
self.threading.start()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 70, in start
self.target()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/animation_threading.py”, line 30, in target
self.run()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 176, in run_all_frames
self.run_one_frame()
File “/usr/lib/python3.5/contextlib.py”, line 77, in exit
self.gen.throw(type, value, traceback)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 167, in run_context
self.cleanup(clean_layout)
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/animation/animation.py”, line 89, in cleanup
self.layout.cleanup()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 73, in cleanup
self.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/layout/layout.py”, line 106, in push_to_driver
self.threading.push_to_driver()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 93, in push_to_driver
self.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/util/threads/update_threading.py”, line 83, in update_colors
d.update_colors()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/driver_base.py”, line 123, in update_colors
self._send_packet()
File “/home/pi/.virtualenvs/playroom_lighting/lib/python3.5/site-packages/bibliopixel/drivers/serial/driver.py”, line 131, in _send_packet
self.devices.error(fail=False)
TypeError: error() got an unexpected keyword argument ‘fail’
On Sunday, February 4, 2018 at 10:50:18 PM UTC-6, Diddy Wolf wrote:
I have two allpixels for my current project, both of which will be controlling about 400 leds. In stress testing this setup to make sure my rpi can handle running it, I started up two instances of bp with the same project, only chancing the device_id.
{
“driver”: {
“typename”: “serial”,
“num”: 400,
“ledtype”: “APA102”,
“device_id”: X,
“c_order”: “bgr”
},
“layout”: {
“typename”: “bibliopixel.layout.strip.Strip”
},
“animation”: {
“typename”: “BiblioPixelAnimations.strip.Rainbows.RainbowCycle”
},
“run”: {
“fps”: 30
},
“path”: “/development/BiblioPixelAnimations”
}
Running one works fine. Running both, most of the time, seems to work fine. However, occasionally when I startup the second instance, the already running instance will terminate with one of the following errors.
TypeError: error() got an unexpected keyword argument ‘fail’
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
These failures seem to always occur within a few seconds. If it runs longer than that, it has stayed stable for at lest 30 minutes.
Are there issues with running multiple instances of bp, both controlling serial devices?