当我点击我要开始翻译的语言时,使用django rosetta(版本0.7.6)时出现以下错误。它是带有apache的Debian服务器。我认为这个错误是由一些翻译字符串引起的。但是,我无法在本地服务器(使用OS X)和其他程序中模拟此错误进行翻译。可以毫无问题地打开。
感谢您的帮助。
Internal Server Error: /admin/rosetta/
Traceback (most recent call last):
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/rosetta/views.py", line 282, in home
), context_instance=RequestContext(request))
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/shortcuts.py", line 45, in render_to_response
using=using)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/loader.py", line 115, in render_to_string
template_name, context, context_instance, dirs, dictionary)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/engine.py", line 221, in render_to_string
return t.render(context_instance)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 209, in render
return self._render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 201, in _render
return self.nodelist.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 917, in render_node
return node.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/loader_tags.py", line 135, in render
return compiled_parent._render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 201, in _render
return self.nodelist.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 917, in render_node
return node.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/loader_tags.py", line 65, in render
result = block.nodelist.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 917, in render_node
return node.render(context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 963, in render
return render_value_in_context(output, context)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/template/base.py", line 940, in render_value_in_context
value = force_text(value)
File "/home/project/www/deploy/apache/main/../../../deploy/env/lib/python2.7/site-packages/django/utils/encoding.py", line 102, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
DjangoUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128). You passed in <django.utils.functional.__proxy__ object at 0x7f3b054235d0> (<class 'django.utils.functional.__proxy__'>)