【问题标题】:"AttributeError: 'NoneType' object has no attribute 'thread'" Error while committing in Kaggle“AttributeError:'NoneType'对象没有属性'thread'”在Kaggle中提交时出错
【发布时间】:2020-02-10 04:03:40
【问题描述】:

当我尝试在 Kaggle 上提交时遇到以下错误。

Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/opt/conda/lib/python3.6/logging/__init__.py", line 1944, in shutdown h.flush() File "/opt/conda/lib/python3.6/site-packages/absl/logging/__init__.py", line 882, in flush self._current_handler.flush() File "/opt/conda/lib/python3.6/site-packages/absl/logging/__init__.py", line 776, in flush self.stream.flush() File "/opt/conda/lib/python3.6/site-packages/ipykernel/iostream.py", line 341, in flush if self.pub_thread.thread.is_alive(): AttributeError: 'NoneType' object has no attribute 'thread'

有人知道怎么解决吗?

谢谢。

【问题讨论】:

  • 我想你的一个对象做了一个动作myObj.thread,但是这个myObj没有初始化或者有myObj = None或者类似的东西。这就是您收到消息'NoneType' object ... 的原因。您需要检查对象初始化或它的分配。

标签: python machine-learning deep-learning kernel kaggle


【解决方案1】:

我认为这是一个与ipykernel 相关的问题,其中有一个尚未打包到版本中的upstream fix。所以你可能需要等待。

【讨论】:

    【解决方案2】:

    你写了y = x.threadx.thread() 之类的东西,问题是xNoneNone 没有名为“thread”的成员变量

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-24
      • 1970-01-01
      • 1970-01-01
      • 2022-07-20
      • 1970-01-01
      • 2019-01-01
      • 2021-12-26
      • 2019-07-23
      相关资源
      最近更新 更多