During our RL training, the following error occurred:
(AgentLoopWorker pid=8803) ERROR:2026-01-21 22:59:59,285:Error executing code: signal only works in main thread of the main interpreter
Root Cause: This error is caused by the use of Python's signal module in PythonCoderTool (e.g., signal.alarm(0)). Python's signal.signal() function can only be called in the main thread of the main interpreter, which leads to this error.
我们在进行RL训练时,出现如下报错:
(AgentLoopWorker pid=8803) ERROR:2026-01-21 22:59:59,285:Error executing code: signal only works in main thread of the main interpreter
【报错原因】因 PythonCoderTool 中使用了Python的signal模块(例如signal.alarm(0)),而Python的signal.signal() 函数只能在主线程的主解释器中调用。因此导致报错。
During our RL training, the following error occurred:
(AgentLoopWorker pid=8803) ERROR:2026-01-21 22:59:59,285:Error executing code: signal only works in main thread of the main interpreter
Root Cause: This error is caused by the use of Python's signal module in PythonCoderTool (e.g., signal.alarm(0)). Python's signal.signal() function can only be called in the main thread of the main interpreter, which leads to this error.
我们在进行RL训练时,出现如下报错:
(AgentLoopWorker pid=8803) ERROR:2026-01-21 22:59:59,285:Error executing code: signal only works in main thread of the main interpreter
【报错原因】因 PythonCoderTool 中使用了Python的signal模块(例如signal.alarm(0)),而Python的signal.signal() 函数只能在主线程的主解释器中调用。因此导致报错。