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

James Page james.page at ubuntu.com
Fri Jun 6 09:18:16 UTC 2014


Hi Michael

Please could you update the version on the maintainer scripts to align
to the SRU version (1.3+dfsg.1-2ubuntu2~), otherwise the migration will
be repeatedly triggered for any further SRU's of this package.

Thanks!

James

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

Title:
  UnknownLocaleError: unknown locale 'en'

Status in “python-babel” package in Ubuntu:
  Fix Released
Status in “python-babel” source package in Trusty:
  New

Bug description:
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-babel/+bug/1299442/+subscriptions



More information about the Ubuntu-sponsors mailing list