{{{
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/core/management/__init__.py", line 399, in
execute_from_command_line
utility.execute()
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/__init__.py", line 130, in activate
return _trans.activate(language)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 163, in _fetch
res = _merge(apppath)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 150, in _merge
t = _translation(path)
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 132, in
_translation
t = gettext_module.translation('django', path, [loc],
DjangoTranslation)
File "/usr/lib64/python2.7/gettext.py", line 478, in translation
t = _translations.setdefault(key, class_(fp))
File "/home/kamo/.virtualenvs/django/lib/python2.7/site-
packages/django/utils/translation/trans_real.py", line 81, in __init__
gettext_module.GNUTranslations.__init__(self, *args, **kw)
File "/usr/lib64/python2.7/gettext.py", line 180, in __init__
self._parse(fp)
File "/usr/lib64/python2.7/gettext.py", line 315, in _parse
self.plural = c2py(plural)
File "/usr/lib64/python2.7/gettext.py", line 93, in c2py
raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22284>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Hi,
According to this post: http://stackoverflow.com/questions/4935704/django-
gettext-raises-valueerror-plural-forms-expression-could-be-dangerous, this
means that there is an error in one of your translation files, not in
Django.
You need to remove (or better yet, fix) the line that reads `"Plural-
Forms: nplurals=INTEGER; plural=EXPRESSION;\n"`.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/22284#comment:1>
Comment (by Haikson):
Thanks! There was an error in application django-dbtemplates
https://github.com/jezdez/django-dbtemplates
I've removed lines
{{{
#"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 &&
n"
#"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22284#comment:2>
* resolution: invalid => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/22284#comment:3>
* resolution: fixed => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/22284#comment:4>