TypeError: __init__() got an unexpected keyword argument ‘autocompletion‘

1 TypeError: __init__() got an unexpected keyword argument 'autocompletion'

        在使用mmclassification的时候会出现该错误,看起来是哪里的自动补全出了问题。在报错的文件里会有一大堆与click相关的内容。

        造成这个错误的原因是click版本不匹配,可以按照下述命令重新安装更低版本的click。

pip install click==7.1.2

 2 TypeError: 'NoneType' object is not iterable

        在安装mmclassification也会出现该错误,详细错误信息如下:

  File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mim/commands/search.py", line 169, in get_model_info
    dataframe = convert2df(metadata)
  File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mim/commands/search.py", line 357, in convert2df
    for result in results:
TypeError: 'NoneType' object is not iterable

         解决方法是在357前增加if results is None: continue。如下所示:    

if results is None:
    continue
for result in results:

3 mmclassification 安装方式

        conda create -n openmmlab python=3.7 -y
        conda activate openmmlab
        pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f         https://download.pytorch.org/whl/torch_stable.html
        pip3 install openmim
        mim install mmcv-full
        git clone https://github.com/open-mmlab/mmclassification.git
        #如果github连接不上,可用gittee替换。
        #git clone https://gitee.com/monkeycc/mmclassification.git
        cd mmclassification
        pip install -v -e .

        具体请参考博客:https://blog.csdn.net/suiyingy/article/details/125452839

【python三维深度学习】python三维点云从基础到深度学习_Coding的叶子的博客-CSDN博客_python 三维点云

更多三维、二维感知算法和金融量化分析算法请关注“乐乐感知学堂”微信公众号,并将持续进行更新。

猜你喜欢

转载自blog.csdn.net/suiyingy/article/details/125459309