[Bug 1299442] [NEW] UnknownLocaleError: unknown locale 'en'

Launchpad Bug Tracker 1299442 at bugs.launchpad.net
Sun May 18 10:55:13 UTC 2014


You have been subscribed to a public bug by Michael Bienia (geser):

On two machines I've upgraded (one from precise another from saucy) the
file /usr/share/python-babel-localedata/localedata/en.dat has somehow
been deleted.  Reinstalling the package resolves the problem.

  File "/usr/lib/python2.7/dist-packages/babel/messages/catalog.py", line 337, in _get_mime_headers
    locale='en')))
  File "/usr/lib/python2.7/dist-packages/babel/dates.py", line 609, in format_datetime
    locale = Locale.parse(locale)
  File "/usr/lib/python2.7/dist-packages/babel/core.py", line 313, in parse
    raise UnknownLocaleError(input_id)
UnknownLocaleError: unknown locale 'en'

Version: 1.3+dfsg.1-2ubuntu1

> dpkg -L python-babel-localedata  | grep en.dat
/usr/share/python-babel-localedata/localedata/en.dat
> file /usr/share/python-babel-localedata/localedata/en.dat
/usr/share/python-babel-localedata/localedata/en.dat: ERROR: cannot open `/usr/share/python-babel-localedata/localedata/en.dat' (No such file or directory)


[Impact]

The python-babel package got split into python-babel and python-babel-
localedata. There were some upgrade issues which got fixed in
1.3+dfsg.1-2 and 1.3+dfsg.1-2.1. Ubuntu merged the package between those
versions and missed the second fix. This SRU backports the changes from
1.3+dfsg.1-3 to the package scripts for python-babel.

[Test case]

- Install the python-babel package from either saucy or precise
- Run "pybabel --list-locales" and get a list of locales
- Upgrade python-babel to the version in trusty (will pull in python-babel-localedata)
- Run "pybabel --list-locales" again and get the above error
- Upgrade to the fixed version
- Run "pybabel --list-locales" again and get a list of locales again

- Purge python-babel and python-babel-localedata (to start from fresh to test an upgrade directly to the fixed version)
- Install the python-babel package from either saucy or precise again
- Run "pybabel --list-locales" and get a list of locales
- Upgrade directly to the fixed version
- Run "pybabel --list-locales" and get a list of locales

** Affects: python-babel (Ubuntu)
     Importance: Undecided
         Status: Confirmed

-- 
UnknownLocaleError: unknown locale 'en'
https://bugs.launchpad.net/bugs/1299442
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list