I'm often getting issue with S2A_fm ,after standy or sometimes during testing ... mesage like: Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in bootstrap_inner self.run() File "/usr/local/lib/python2.7/dist-packages/PyMata/pymata_command_handler.py", line 816, in run method = dispatch_entry TypeError: 'NoneType' object has no attribute 'getitem'
changing USB ports do not work and only restarting Linux works ? any tip for that ?
also this one : Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/local/lib/python2.7/dist-packages/PyMata/pymata_command_handler.py", line 829, in run method(command_data) File "/usr/local/lib/python2.7/dist-packages/PyMata/pymata_command_handler.py", line 388, in analog_message self.analog_response_table[data[self.RESPONSE_TABLE_MODE]][self.RESPONSE_TABLE_PIN_DATA_VALUE] IndexError: list index out of range
@braniti The cause of both exceptions I believe are the same. Scratch does not provide an event when it is closing down, so the Arduino continues to report data even though PyMata has exited. When s2a_fm is restarted, it starts receiving unexpected data. Another issue is that for some Arduino boards(like the Leonardo) , when you remove the USB cable and plug it back in or hit the reset button, the reset causes Linux to assign another com port than the one that was previously used. If you are noticing that a new COM port was created after an Arduino reset or unplugging the board, the only solution is to reboot Linux. You may wish to try s2aio, which will find the first active COM port. It will "hop" around with the reassignment of the com port, but you may still have to manually reset or unplug the Arduino. One last thing you can try, is to disable any of the pins you previously enabled using the Scratch blocks. Then when you exit, there should not be any data coming from the Arduino. Please let me know if you are still having issues.
thank you for detailed reply. I will check soon, but first have to get kids game working on s2a_fm and then move to your new version .... Thank you for the great app!
Hopefully in January or February i have some projects for activitiy at my kids School.