解决python toad包报错joblib.externals.loky.process_executor.TerminatedWorkerError

当运行官方的toad.quality()时,无法得到结果,并抛出报错

解决方法

  1. 首先检查toad版本:我的是toad == 0.0.64,python3.6版本
  2. 只需更换python版本为3.8,然后重新安装toad即可:pip install toad

问题解析

toad=0.1.0时不会出问题,但是python3.6无法更新到0.1.0,python3.8可以(python3.7未尝试)

toad github地址:https://github.com/amphibian-dev/toad
toad 文档:https://toad.readthedocs.io/en/stable/tutorial.html
toad pypi地址:https://pypi.org/project/toad/

完整报错

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
Traceback (most recent call last):
OSError: [Errno 9] Bad file descriptor
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Fatal Python error: PyCOND_WAIT(gil_cond) failed
Thread 0x00007000059e5000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 172 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x00007000054e2000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 138 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x0000700004fdf000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pTraceback (most recent call last):
ydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/py  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
thon3.6/threading.py", line 916 in OSError: [Errno 9] Bad file descriptor
_bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Current thread 0x0000700004adc000 (most recent call first):
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 299 in wait
  File "/opt/anaconda3/envs/baogao/lib/python3.6/queue.py", line 173 in get
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 367 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x000000010e2fae00 (most recent call first):
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/fork_exec.py", line 22 in close_fds
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/fork_exec.py", line 45 in fork_exec
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/popen_loky_posix.py", line 157 in _launch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/popen_loky_posix.py", line 52 in __init__
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/process.py", line 39 in _Popen
  File "/opt/anaconda3/envs/baogao/lib/python3.6/multiprocessing/process.py", line 105 in start
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1100 in _adjust_process_count
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1109 in _ensure_executor_running
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1135 in submit
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/reusable_executor.py", line 178 in submit
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 531 in apply_async
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 779 in _dispatch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 861 in dispatch_one_batch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 1043 in __call__
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/toad/stats.py", line 399 in quality
  File "<ipython-input-1-effea143780f>", line 1 in <module>
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343 in run_code
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3263 in run_ast_nodes
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3072 in run_cell_async
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/async_helpers.py", line 68 in _pseudo_sync_runner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2895 in _run_cell
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2867 in run_cell
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 482 in add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_ipython_code_executor.py", line 41 in do_add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_code_executor.py", line 108 in add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 106 in ipython_exec_code
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 195 in console_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1837 in do_it
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 866 in process_internal_commands
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1161 in _do_wait_suspend
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1147 in do_wait_suspend
  File "/Users/xq/Desktop/data/pycharm_pro/trend_cluster/test/finance_toad/learn_base.py", line 32 in <module>
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18 in execfile
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1483 in _exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1476 in run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2164 in main
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2173 in <module>
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Fatal Python error: PyCOND_WAIT(gil_cond) failed
Thread 0x00007000059e5000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 172 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x00007000054e2000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 138 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x0000700004fdf000 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292 in _on_run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 218 in run
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Current thread 0x0000700004adc000 (most recent call first):
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 299 in wait
  File "/opt/anaconda3/envs/baogao/lib/python3.6/queue.py", line 173 in get
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 367 in _on_run
  File "/Applications/PyCharm.aTraceback (most recent call last):
pp/Contents/plugins/python/helpers/pydev/_pydevd_bundle/p  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
ydevd_comm.py", line 218 in run
  File "/opt/anaOSError: [Errno 9] Bad file descriptor
conda3/envs/baogao/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/threading.py", line 884 in _bootstrap
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 811 in __call__
Thread 0x000000010e2fae00 (most recent call first):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd_tracing.py", line 248 in set_trace_to_threads
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 524 in enable_tracing
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1778 in _locked_settrace
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1697 in settrace
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1909 in settrace_forked
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 74 in _on_forked_process
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 638 in new_fork
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/fork_exec.py", line 43 in fork_exec
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/popen_loky_posix.py", line 157 in _launch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/popen_loky_posix.py", line 52 in __init__
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/backend/process.py", line 39 in _Popen
  File "/opt/anaconda3/envs/baogao/lib/python3.6/multiprocessing/process.py", line 105 in start
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1100 in _adjust_process_count
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1109 in _ensure_executor_running
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 1135 in submit
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/externals/loky/reusable_executor.py", line 178 in submit
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 531 in apply_async
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 779 in _dispatch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 861 in dispatch_one_batch
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 1043 in __call__
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/toad/stats.py", line 399 in quality
  File "<ipython-input-1-effea143780f>", line 1 in <module>
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343 in run_code
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3263 in run_ast_nodes
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3072 in run_cell_async
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/async_helpers.py", line 68 in _pseudo_sync_runner
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2895 in _run_cell
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2867 in run_cell
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 482 in add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_ipython_code_executor.py", line 41 in do_add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_code_executor.py", line 108 in add_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 106 in ipython_exec_code
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 195 in console_exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1837 in do_it
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 866 in process_internal_commands
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1161 in _do_wait_suspend
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1147 in do_wait_suspend
  File "/Users/xq/Desktop/data/pycharm_pro/trend_cluster/test/finance_toad/learn_base.py", line 32 in <module>
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18 in execfile
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1483 in _exec
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1476 in run
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2164 in main
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2173 in <module>
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 292, in _on_run
    r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-effea143780f>", line 1, in <module>
    toad.quality(total_df,'y_label')
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/toad/stats.py", line 399, in quality
    rows = pool(jobs)
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 1056, in __call__
    self.retrieve()
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/parallel.py", line 935, in retrieve
    self._output.extend(job.get(timeout=self.timeout))
  File "/opt/anaconda3/envs/baogao/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
    return future.result(timeout=timeout)
  File "/opt/anaconda3/envs/baogao/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/opt/anaconda3/envs/baogao/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
joblib.externals.loky.process_executor.TerminatedWorkerError: A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker.
The exit codes of the workers are {SIGABRT(-6)}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

呆萌的代Ma

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值