最近调试代码不知道安装什么包导致代码运行的时候出现报错 AttributeError: 'NoneType' object has no attribute 'loader' ,虽然代码也能运行通过,但是报错还是很不舒服。
Remainder of file ignored
Error processing line 1 of D:\Anaconda3\envs\fastrcnn\lib\site-packages\vision-1.0.0-py3.6-nspkg.pth:
Traceback (most recent call last):
File "D:\Anaconda3\envs\fastrcnn\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 568, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
根据网上给出的解决办法,找到错误提示中出现的路径
D:\ProgramData\Anaconda3\envs\tf-gpu\lib\site-packages\vision-1.0.0-py3.7-nspkg.pth
打开该文件
在第一行的分号后边添加回车,