Bug when updating Anaconda-Navigator

0 views
Skip to first unread message

Clem Wang

unread,
Jul 10, 2021, 11:14:58 PM7/10/21
to Anaconda - Public
I just installed Anancoda on Ubuntu 20.04 with


I launch anaconda-navigator.  It said I needed to update and when I did, I got an error.  The variable command is actually a list instead of string as can be seen in the source code

This is the trace:

anaconda-navigator
Traceback (most recent call last):
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 541, in setup
    self.post_setup(conda_data=conda_data)
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 610, in post_setup
    self.post_visible_setup(conda_data)
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 688, in post_visible_setup
    packages=packages, is_root_writable=is_root_writable
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 754, in check_for_updates
    is_root_writable=is_root_writable,
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 825, in update_application
    version, is_root_writable=is_root_writable
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 858, in open_updater
    as_admin=as_admin,
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/utils/launch.py", line 316, in launch
    new_command = command.replace('\\', '/')
AttributeError: 'list' object has no attribute 'replace'
Traceback (most recent call last):
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 825, in update_application
    version, is_root_writable=is_root_writable
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 858, in open_updater
    as_admin=as_admin,
  File "/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/utils/launch.py", line 316, in launch
    new_command = command.replace('\\', '/')
AttributeError: 'list' object has no attribute 'replace'


The problem is this code:
/home/clem/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py

        command = [
            'navigator-updater',
            '--latest-version',
            version,
            '--prefix',
            prefix,
        ]

        as_admin = WIN and not is_root_writable

        return launch(
            prefix,
            command,
            leave_path_alone,
            package_name='anaconda-navigator-updater',
            root_prefix=root_prefix,
            non_conda=True,
            as_admin=as_admin,
        )

and launch() expects command to be a string.


Reply all
Reply to author
Forward
0 new messages