What Kind of errors are you getting? When I ran mine connected to a terminal I was getting memory errors which could be reduced by adding a code block with: import gc gc.collect() To the beginning of the main loop.