0

I was rooted and accidentally run mintsources on my Linux Mint 20 Cinnamon:

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1919, in <module>
    Application().run()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 968, in __init__
    self.detect_official_sources()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1834, in detect_official_sources
    self.update_flags()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1841, in update_flags
    if selected_mirror[-1] == "/":
IndexError: string index out of range

I don't know if that is the reason why I can't run it as normal user now I get absolutely the same result after entering my password in GUI:

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1919, in <module>
    Application().run()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 968, in __init__
    self.detect_official_sources()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1834, in detect_official_sources
    self.update_flags()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1841, in update_flags
    if selected_mirror[-1] == "/":
IndexError: string index out of range

Since I do not understand the traceback calls, I trust you will help me out with this, I did not use mintsources like for a year, so maybe it isn't the reason, I just don't know, where to start.

0

Resolved, I removed all double spaces (and more extra spaces) from this file:

/etc/apt/sources.list.d/official-package-repositories.list

I remembered I edited it to my liking with more spaces to have columns aligned. And also to combine some entries.

Those combinations obviously don't mind, but extra spaces do (to mintsources, not apt).


So in the end, it looks like this:

deb http://packages.linuxmint.com ulyana main upstream import backport 
deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner

Afterward, I am able to run mintsources both as normal user, and root as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.