The anaconda-navigator interface cannot be started, loading application, report ERROR download_api._get_url error

Anaconda3, which was originally installed, suddenly couldn’t be started today. It got stuck in the loading application interface. It was forced to uninstall and reinstall. The situation is the same. Errors are reported as follows:

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)

The reason is the same as the connection analysis above, mainly because the vscode address obtained by self._VSCODE_ENDPOINT in vscode_application_data() is wrong ( https://vscode-update.azurewebsites.net/api/update/win32-x64/stable/version ). As a result of the visit, the correct address is: https://update.code.visualstudio.com/api/update/win32-x64/stable/version

Solution: in Anaconda_ Search in api.py

        VSCODE_ENDPOINT = (
            'https://vscode-update.azurewebsites.net/api/update'
            '/{}/stable/version'.format(VSCODE_SUBDIR)
        )

Change the link to:

        VSCODE_ENDPOINT = (
            'https://update.code.visualstudio.com/api/update'
            '/{}/stable/version'.format(VSCODE_SUBDIR)
        )

Save the file and restart Anaconda navigator to solve the problem

Read More: