Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#12482 closed (worksforme)

i18n crashed on developement version

Reported by: guileen@… Owned by: nobody
Component: Uncategorized Version: dev
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

Description

the crash messages below:

'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "D:\workspace\cutecms\cutecms\manage.py", line 2, in <module>
    from django.core.management import execute_manager
  File "D:\opensource\django\django\core\management\__init__.py", line 3, in <mo
dule>
    from optparse import OptionParser, NO_DEFAULT
  File "D:\Python25\lib\optparse.py", line 404, in <module>
    _builtin_cvt = { "int" : (_parse_int, _("integer")),
  File "D:\Python25\lib\gettext.py", line 566, in gettext
    return dgettext(_current_domain, message)
  File "D:\Python25\lib\gettext.py", line 530, in dgettext
    codeset=_localecodesets.get(domain))
  File "D:\Python25\lib\gettext.py", line 465, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "D:\Python25\lib\gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "D:\Python25\lib\gettext.py", 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 init.py found'
and the LocalMiddleware.process_request method take a long time on test.

Change History (2)

comment:1 by Karen Tracey, 14 years ago

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 settings.py 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 manage.py command, but what exactly might be relevant) and what LANG you have set in settings.py. That too could be relevant.

comment:2 by Jacob, 12 years ago

milestone: 1.2

Milestone 1.2 deleted

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