Planet Python
Follow
Robin Wilson: How to fix a weird pandas and pyarrow issue with BirdNetPi
BirdNetPi is a Raspberry Pi-based system that uses machine learning to identify bird sounds captured by a microphone. It features a web interface for displaying bird classifications and recordings. Initially, the author encountered issues with missing graphs and a "Connecting…" message on the Species Stats page. Many visualization scripts in the Python environment crashed with an "Illegal instruction" error. This low-level error suggested a problem with a package containing native C/C++ extensions. After troubleshooting pandas, the author used Python's import timing tools to identify the problematic package. The import of pyarrow, a Python interface for the arrow file format, immediately preceded the crash. Pyarrow was believed to be an optional dependency of pandas. A direct import of pyarrow in the BirdNet Python interpreter confirmed it was the cause of the crashes. A search of the BirdNetPi git repository revealed no usage of pyarrow. Therefore, the author uninstalled pyarrow entirely. This action resolved all the previously encountered issues without any negative consequences for BirdNetPi's functionality.