Hi Samson,

What do you have in the "handlers" section of your app.yaml?

Cheers,
Brian

On Sat, Nov 5, 2011 at 4:52 AM, Samson <tse.sam...@gmail.com> wrote:
> Hi,
>
> I am currently stuck with an issue that I can't fix.  I've just
> upgraded my app to Python 2.7 using Django Nonrel.  I've tried posting
> this question to that group but did not get any response.  So any help
> would be greatly appreciated.
>
> This is what I am getting when I try to perform a defer function in
> the production environment:
> Error: Server Error
>
> The server encountered an error and could not complete your request.
> If the problem persists, please report your problem and mention this
> error message and the query that caused it.
>
> In the log this is what it shows:
> Traceback (most recent call last):
>  File "/base/python27_runtime/python27_lib/versions/1/google/
> appengine/runtime/wsgi.py", line 174, in Handle
>    result = handler(self._environ, self._StartResponse)
> TypeError: 'module' object is not callable
>
> The code that is currently causing the problem:
>
> def _update_profile_image_url(user, new_url = None):
>    from communication.message.models import PrivateMessagePool
>    for entity in
> PrivateMessagePool.objects.filter(sender=user).all():
>        entity.sender_image_url = new_url
>        entity.save()
>
> #Update profile images when it's required
> from google.appengine.ext import deferred
> try:
>    queue_name = 'default'
>    deferred.defer(_update_profile_image_url, self.user,
> new_url=self.image_url, _queue=queue_name)
> except Exception, e:
>    logging.error('caught%s in image upload deferred section', e)
>    raise e
>
> Everything works in the development environment under the localhost.
> However, when I deploy it to production, it crashes every single
> time.  I've tried to comment out the deferred.defer line in production
> and everything works again.  So it has to be the background task that
> is causing the problem.  But there is no way for me to pinpoint what
> is failing since I didn't get any error messages in development and
> everything works smoothly.  Please help if you know what I did wrong.
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to