KeyboardInterrupt error on Debug mode exit when using ray and PyCharm

Viewed 84

After upgrading PyCharm from 2021.1.3 to 2022.1 (Community version) a weird issue appeared. My previously working codes which use the ray library started to throw an exception after finishing in debug mode. Normal runs return with 0, only debug mode is affected. During upgrade my config was kept. Google search tells me that this keyInterrupt issue sometime happens when using multiprocessing, but I checked it and multiprocessing works fine.

Even this code:

import ray
ray.init()

results in this exception:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "C:\Users\user\PycharmProjects\venv\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\user\PycharmProjects\venv\lib\site-packages\ray\worker.py", line 1146, in shutdown
    global_worker.core_worker.shutdown()
KeyboardInterrupt

I'm using Python 3.9, ray 1.12.0 and Windows 10. Do you have any idea what causes this?

0 Answers
Related