-
Notifications
You must be signed in to change notification settings - Fork 22
F. Troubleshooting
This wiki page is dedicated to common troubleshooting problems that you might encounter while installing and using brains-py.
The win32api library is needed in order to handle multi-threading on Windows machines. This is required in order to make sure that once a program starts sending data to the devices, using the driver, this can be stopped safely.
This error is caused by a difference in the installation between the library versions. Sometimes, pypiwin32 automatically installs the library pywin32 in an incorrect version. The problem can be solved by running the following command in your environment:
pip install --upgrade pywin32==225
If this does not work, try doing it with the following commands:
pip uninstall pypiwin32 pywin32 -y && pip install pywin32==225
By default matplotlib uses TK gui toolkit, when you're rendering an image without using the toolkit (i.e. into a file or a string), matplotlib still instantiates a window that doesn't get displayed, causing all kinds of problems. In order to avoid that, you should use an Agg backend. (from: Alex Volkov)
File "C:\Users\YOUR_USER\anaconda3\envs\bspy\lib\tkinter\__init__.py", line 4014, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x000002DB856F0040>
Tcl_AsyncDelete: async handler deleted by the wrong thread
The solution is to change the default matplotlib engine to one that does not use a GUI:
import matplotlib
matplotlib.use('Agg')