[Solved]Software Sources fails

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
PeterBell

[Solved]Software Sources fails

Post by PeterBell »

Can anyone help?

I am unable to access software sources in my Tara Cinnamon system.

Code: Select all

peter@Sala:~$ pkexec mintsources
peter@Sala:~$ 
(mintSources.py:4437): Gtk-WARNING **: 17:40:36.967: Locale not supported by C library.
	Using the fallback 'C' locale.
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1559, in <module>
    Application().run()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 772, in __init__
    self.mirrors = self.read_mirror_list(self.config["mirrors"]["mirrors"])
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 933, in read_mirror_list
    for line in mirrorsfile.readlines():
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5274: ordinal not in range(128)

Code: Select all

peter@Sala:~$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com tara main upstream import backport
           deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ bionic partner
           Active apt sources in file: /etc/apt/sources.list.d/sublime-text.list
           deb https://download.sublimetext.com/ apt/stable/
peter@Sala:~$
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18155
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Software Sources fails

Post by karlchen »

Hello, Peter.

As the very first warning in your initial post reads (mintSources.py:4437): Gtk-WARNING **: 17:40:36.967: Locale not supported by C library.
Using the fallback 'C' locale.
,
please, open the terminal window again.
Type locale and press enter. Please, post the complete output which the command locale displays.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 750 days now.
Lifeline
PeterBell

Re: Software Sources fails

Post by PeterBell »

Karl,
Thanks for the response. locale output below.
karlchen wrote: Fri Jul 20, 2018 6:04 amType locale and press enter. Please, post the complete output which the command locale displays.

Code: Select all

peter@Sala:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_PH.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_PH.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_PH.UTF-8
LC_NAME=en_PH.UTF-8
LC_ADDRESS=en_PH.UTF-8
LC_TELEPHONE=en_PH.UTF-8
LC_MEASUREMENT=en_PH.UTF-8
LC_IDENTIFICATION=en_PH.UTF-8
LC_ALL=
peter@Sala:~$ 
User avatar
karlchen
Level 23
Level 23
Posts: 18155
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Software Sources fails

Post by karlchen »

Hi, Peter.

I assume mintsources should work with your locale settings, but it fails due to some bug somewhere.
What happens if you temporarily overwrite all the other settings by exporting LC_ALL=en_US.UTF-8?

Code: Select all

LC_ALL=en_US.UTF-8 mintsources
Note: LC_ALL would be valid for mintsources and its child processes only. Your systemwide settings would not be changed.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 750 days now.
Lifeline
PeterBell

Re: Software Sources fails

Post by PeterBell »

Karl,
Thanks, once more, for your assistance.

Code: Select all

LC_ALL=en_US.UTF-8 pkexec mintsources
runs okay so, yes, the problem lies with locale.

The question, then is how to make this work (and, possibly, other applications) without having to make a temporary locale change every time it runs.
gm10

Re: Software Sources fails

Post by gm10 »

try

Code: Select all

sudo locale-gen --purge --no-archive
PeterBell

[Solved] Re: Software Sources fails

Post by PeterBell »

Well, that produced several errors:

Code: Select all

Generating locales (this might take a while)...
error: Bad entry 'en_AG '
  en_AG.UTF-8... done
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
error: Bad entry 'en_GB '
  en_GB.UTF-8... done
error: Bad entry 'en_GB.iso88591 '
error: Bad entry 'en_GB.iso885915 '
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IL.UTF-8... done
error: Bad entry 'en_IN '
  en_IN.UTF-8... done
  en_IN.UTF-8... done
error: Bad entry 'en_NG '
  en_NG.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
error: Bad entry 'en_ZM '
  en_ZM.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
... and pkexec mintsources still produces the 'Locale not supported' warning:

Code: Select all

peter@Sala:~$ pkexec mintsources
peter@Sala:~$ 
(mintSources.py:6073): Gtk-WARNING **: 21:19:10.713: Locale not supported by C library.
	Using the fallback 'C' locale.

but it does now run.


Edit:
Okay, after rebooting and clicking 'Apply System-Wide' in 'Language Settings', all the messages seem to have gone and mintsources runs fine.

Many thanks for pointing me in the right direction, Karl and gm10!
gm10

Re: Software Sources fails

Post by gm10 »

Good to hear. You're welcome. :)
Locked

Return to “Software & Applications”