Defered Jobs - Django template loaders not loaded (URGENT)

34 views
Skip to first unread message

Amine Azariz

unread,
Jun 5, 2012, 5:43:33 AM6/5/12
to google-a...@googlegroups.com
Python: 2.5
Django: 1.2
Billing : ON
Prod: Yes

Hello guys,

I'm experiencing this issue -from time to time- on my deferred jobs. I've changed anything in my code. it's starts to happen right after the 1.6.6 was released.

How can I resolve this one ?

Traceback (most recent call last):
[...]
in execute_differed_processing
   plainTextTemplate = loader.get_template(self.__templates[method] + ".txt")
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loader.py", line 157, in get_template
   template, origin = find_template(template_name)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loader.py", line 134, in find_template
   source, display_name = loader(name, dirs)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loaders/filesystem.py", line 55, in load_template_source
   import warnings
SystemError: Parent module 'django.template.loaders' not loaded


johnP

unread,
Jun 5, 2012, 10:53:26 AM6/5/12
to Google App Engine
Did you include this import in you deferred module?

from google.appengine.ext.webapp import template

Guido Van Rossum includes this import in his example application
because it "makes many django import issues go away".

johnP


On Jun 5, 2:43 am, Amine Azariz <amine.aza...@greendizer.com> wrote:
> Python: 2.5
> Django: 1.2
> Billing : ON
> Prod: Yes
>
> Hello guys,
>
> I'm experiencing this issue -from time to time- on my deferred jobs. I've
> changed anything in my code. it's starts to happen right after the 1.6.6
> was released.
>
> How can I resolve this one ?
>
>  Traceback (most recent call last):
> [...]
> in execute_differed_processing
>     plainTextTemplate = loader.get_template(self.__templates[method] +
> ".txt")
>   File
> "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/tem plate/loader.py",
> line 157, in get_template
>     template, origin = find_template(template_name)
>   File
> "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/tem plate/loader.py",
> line 134, in find_template
>     source, display_name = loader(name, dirs)
>   File
> "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/tem plate/loaders/filesystem.py",

Amine Azariz

unread,
Jun 5, 2012, 1:47:35 PM6/5/12
to google-a...@googlegroups.com
No, I dosen't. Actually it's not happening just in the defered jobs, it's seems to happen also in many other places as you can see in theses logs:

<type 'exceptions.SystemError'>: Parent module 'django.template.loaders' not loaded
Traceback (most recent call last):
 File "/base/data/home/apps/s~xxxxx/2-8-5.359299178383344140/main.py", line 46, in main
   util.run_wsgi_app(application)
 File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/util.py", line 98, in run_wsgi_app
   run_bare_wsgi_app(add_wsgi_middleware(application))
 File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/util.py", line 116, in run_bare_wsgi_app
   result = application(env, _start_response)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/core/handlers/wsgi.py", line 248, in __call__
   response = self.get_response(request)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/core/handlers/base.py", line 141, in get_response
   return self.handle_uncaught_exception(request, resolver, sys.exc_info())
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/core/handlers/base.py", line 180, in handle_uncaught_exception
   return callback(request, **param_dict)
 File "/base/data/home/apps/s~xxxxx/2-8-5.359299178383344140/xxxxx/apps/errors/views.py", line 26, in view_500
   statusCode=HttpStatusCodes.INTERNAL_ERROR
 File "/base/data/home/apps/s~xxxxx/2-8-5.359299178383344140/libs/gdhelpers/http/__init__.py", line 527, in get_http_response
   t = loader.get_template(self.templateName)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loader.py", line 157, in get_template
   template, origin = find_template(template_name)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loader.py", line 134, in find_template
   source, display_name = loader(name, dirs)
 File "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loaders/filesystem.py", line 55, in load_template_source
   import warnings
Reply all
Reply to author
Forward
0 new messages