[bug]Error in pacman mirrors

I’m getting the following error when trying to run pacman-mirrors -g:

Traceback (most recent call last):
  File "/usr/bin/pacman-mirrors", line 23, in <module>
    from pacman_mirrors import pacman_mirrors
  File "/usr/lib/python3.5/site-packages/pacman_mirrors/pacman_mirrors.py", line 40, in <module>
    from . import i18n
  File "/usr/lib/python3.5/site-packages/pacman_mirrors/i18n.py", line 23, in <module>
    lc, encoding = locale.getdefaultlocale()
  File "/usr/lib/python3.5/locale.py", line 558, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python3.5/locale.py", line 486, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: en_IL

System is fully updated.
Please advise.

did you check or append anything to the pacman-mirrors.conf?

No.
Simple first-time running the system, it’s one of the first things I do.
And I got that error.

how about when pacman is updating? did any errors occur?

what is the output of locale?

LANG=en_IL
LC_CTYPE="en_IL"
LC_NUMERIC=en_IL
LC_TIME=en_IL
LC_COLLATE="en_IL"
LC_MONETARY=en_IL
LC_MESSAGES="en_IL"
LC_PAPER=en_IL
LC_NAME=en_IL
LC_ADDRESS=en_IL
LC_TELEPHONE=en_IL
LC_MEASUREMENT=en_IL
LC_IDENTIFICATION=en_IL
LC_ALL=

As a workaround try to use LC_ALL=C pacman-mirrors -g
Maybe you should install your locale manually. See

I am familiar with the mirrors that are the fastest for me, and also most updated, so, as a workaround, I edit the mirror list with an editor.

However, there’s probably a bug in pacman-mirrors because the locale is new.
Hence, the report.

I hope it’ll get fixed soon.

1 Like

Post the output of sudo locale-gen. If it fails you have to fix your locale setup.

Generating locales...
  en_US.UTF-8... done
  en_IL.UTF-8... done
  en_US.UTF-8... done
Generation complete.

What I thought. Please fix your locales

[phil@manjaro extra]$ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=
[phil@manjaro extra]$ cat /etc/locale.conf
LANG=de_DE.UTF-8

You should have en_IL.UTF-8 in your /etc/locale.conf

1 Like

That ,ofc, worked, and thank you.

However, I installed a new system earlier today with the 16.08 xfce edition, using calamares.
It identified my location automatically, and all I did was “next -> next ->…” etc.

And I got that error. I did nothing manually.
Maybe something in regard to that locale should be looked at.

Thanks again for your help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.