So I have a project running at version 1.6 fine on IIS. I switch it to use 
1.7, and it quits working. Specifically, it's trying to translate something 
using ugettext, but it's not in my code. It seems to be trying to translate 
something using dateformat.py from django. I don't understand what's going 
on, because when I run the exact same code through Aptana (so NOT IIS) it 
runs fine (again, using django 1.7) I thought maybe it was the fcgi script 
causing the problem, so I entered import django and django.setup() at the 
top of that file before calling runfastcgi, but that didn't resolve the 
issue. In my settings.py I'm doing two translations, but I am using 
ugettext_lazy in that file, and I commented that section out and that 
didn't resolve it either. What could be going on? I've copied the entire 
error traceback below. Thanks.



Error occurred: Traceback (most recent call last): File 
"C:\Python27\Scripts\wfastcgi.py", line 736, in main result = 
handler(record.params, response.start) File 
"C:\Virtual\Django17\lib\site-packages\django\core\handlers\wsgi.py", line 
187, in __call__ response = self.get_response(request) File 
"C:\Virtual\Django17\lib\site-packages\django\core\handlers\base.py", line 
199, in get_response response = self.handle_uncaught_exception(request, 
resolver, sys.exc_info()) File 
"C:\Virtual\Django17\lib\site-packages\django\core\handlers\base.py", line 
236, in handle_uncaught_exception return 
debug.technical_500_response(request, *exc_info) File 
"C:\Virtual\Django17\lib\site-packages\django\views\debug.py", line 91, in 
technical_500_response html = reporter.get_traceback_html() File 
"C:\Virtual\Django17\lib\site-packages\django\views\debug.py", line 350, in 
get_traceback_html return t.render(c) File 
"C:\Virtual\Django17\lib\site-packages\django\template\base.py", line 148, 
in render return self._render(context) File 
"C:\Virtual\Django17\lib\site-packages\django\template\base.py", line 142, 
in _render return self.nodelist.render(context) File 
"C:\Virtual\Django17\lib\site-packages\django\template\base.py", line 844, 
in render bit = self.render_node(node, context) File 
"C:\Virtual\Django17\lib\site-packages\django\template\debug.py", line 80, 
in render_node return node.render(context) File 
"C:\Virtual\Django17\lib\site-packages\django\template\debug.py", line 90, 
in render output = self.filter_expression.resolve(context) File 
"C:\Virtual\Django17\lib\site-packages\django\template\base.py", line 624, 
in resolve new_obj = func(obj, *arg_vals) File 
"C:\Virtual\Django17\lib\site-packages\django\template\defaultfilters.py", 
line 769, in date return format(value, arg) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\dateformat.py", line 
343, in format return df.format(format_string) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\dateformat.py", line 
35, in format pieces.append(force_text(getattr(self, piece)())) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\dateformat.py", line 
268, in r return self.format('D, j M Y H:i:s O') File 
"C:\Virtual\Django17\lib\site-packages\django\utils\dateformat.py", line 
35, in format pieces.append(force_text(getattr(self, piece)())) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\encoding.py", line 85, 
in force_text s = six.text_type(s) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\functional.py", line 
144, in __text_cast return func(*self.__args, **self.__kw) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\translation\__init__.py", 
line 83, in ugettext return _trans.ugettext(message) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\translation\trans_real.py", 
line 325, in ugettext return do_translate(message, 'ugettext') File 
"C:\Virtual\Django17\lib\site-packages\django\utils\translation\trans_real.py", 
line 306, in do_translate _default = translation(settings.LANGUAGE_CODE) 
File 
"C:\Virtual\Django17\lib\site-packages\django\utils\translation\trans_real.py", 
line 209, in translation default_translation = 
_fetch(settings.LANGUAGE_CODE) File 
"C:\Virtual\Django17\lib\site-packages\django\utils\translation\trans_real.py", 
line 189, in _fetch "The translation infrastructure cannot be initialized 
before the " AppRegistryNotReady: The translation infrastructure cannot be 
initialized before the apps registry is ready. Check that you don't make 
non-lazy gettext calls at import time. StdOut: StdErr: 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b01bc970-89a0-4a55-a991-8b2c61a9dcf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to