Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#12482 closed (worksforme)

i18n crashed on developement version

Reported by: guileen@… Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


the crash messages below:

'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "D:\workspace\cutecms\cutecms\", line 2, in <module>
    from import execute_manager
  File "D:\opensource\django\django\core\management\", line 3, in <mo
    from optparse import OptionParser, NO_DEFAULT
  File "D:\Python25\lib\", line 404, in <module>
    _builtin_cvt = { "int" : (_parse_int, _("integer")),
  File "D:\Python25\lib\", line 566, in gettext
    return dgettext(_current_domain, message)
  File "D:\Python25\lib\", line 530, in dgettext
  File "D:\Python25\lib\", line 465, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "D:\Python25\lib\", line 437, in find
    for nelang in _expand_lang(lang):
  File "D:\Python25\lib\", line 131, in _expand_lang
    from locale import normalize
ImportError: cannot import name normalize

before the version which I got this crash messages, I got some message like 'warning: local wont import , cause no found'
and the LocalMiddleware.process_request method take a long time on test.

Change History (2)

comment:1 Changed 9 years ago by Karen Tracey

Resolution: worksforme
Status: newclosed

The traceback looks more like a problem with your Python install than a problem with Django. The Django code attempts:

from optparse import OptionParser, NO_DEFAULT

which, after a few calls in Python code ultimately tries:

from locale import normalize

which generates the error.

Can you issue either of these imports from a plain Python prompt on this machine? If not, then the problem is with your Python install, not Django.

FWIW, internationalization seems to be working fine for me with r12063 on a machine that appears to be similar to yours (Windows, Python 2.5). I can set LANG is to some language other than English and the admin interface comes up fine, displaying messages in the chosen language.

Also, you left out of this report some key information like what you do to trigger the error (from the traceback some command, but what exactly might be relevant) and what LANG you have set in That too could be relevant.

comment:2 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top