原先安装的anaconda3,今天突然没法启动了,卡在了loading application的界面,懵逼了会,卸载重装,情况一样,网上搜索根据此文章的帮助(https://blog.csdn.net/tanmx219/article/details/88069375),找到问题。报错如下:
C:\Users\ljw>anaconda-navigator
2021-09-08 22:24:45,500 - ERROR download_api._get_url:417
Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 499, in setup
self.post_setup(conda_data=conda_data)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 536, in post_setup
self.tab_home.setup(conda_data)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 169, in setup
self.set_applications(applications, packages)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 204, in set_applications
apps = self.api.process_apps(applications, prefix=self.current_prefix)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 903, in process_apps
versions=[vsdata.get('productVersion')],
AttributeError: 'str' object has no attribute 'get'
^C
C:\Users\ljw>anaconda-navigator
2021-09-08 22:45:03,049 - ERROR download_api._get_url:417
Expecting value: line 1 column 1 (char 0)
原因和上文连接分析的一样,主要是vscode_application_data()中的self._VSCODE_ENDPOINT获取的vscode地址错误(https://vscode-update.azurewebsites.net/api/update/win32-x64/stable/version)不能访问导致,正确的地址为:https://update.code.visualstudio.com/api/update/win32-x64/stable/version
解决方法:在anaconda_api.py中搜索
VSCODE_ENDPOINT = (
'https://vscode-update.azurewebsites.net/api/update'
'/{}/stable/version'.format(VSCODE_SUBDIR)
)
把链接改为:
VSCODE_ENDPOINT = (
'https://update.code.visualstudio.com/api/update'
'/{}/stable/version'.format(VSCODE_SUBDIR)
)
保存文件,重启anaconda-navigator解决问题
|