hans

hans

【Others】运行python遇到名为namedtuple的错误


错误全文是:

mportError: cannot import name 'namedtuple' from partially initialized module 'collections'

出现这个问题是因为你的.py 文件名和某个模块的函数名重复了,只要改一下文件名就能解决这个问题了。

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.