gregbellan / Stabl

BSD 3-Clause Clear License
38 stars 10 forks source link

Error during execution #10

Closed lazaromsanchezr closed 1 month ago

lazaromsanchezr commented 1 month ago

Hello

After a few successful runs of the algorithm, I get the following error, seemingly related to Tkinter. Could you please check it?

RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x00000196959D7B80>
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 363, in __del__
    if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
xavdurand commented 1 month ago

Hello @lazaromsanchezr ,

Interesting issue. It seems to be an error with the matplotlib package. It did not appear before because we were running on MacOS instead of Windows. A first solution would be to add the following line code at the beginning of the script you are running:

import matplotlib
matplotlib.use('Agg')

Tell me whether it resolved your problem.

lazaromsanchezr commented 1 month ago

Hi Xavier,

Yes, the solution worked.

Thank you!