Thursday, January 31, 2013

Re: an elusive ValueError: 'str' object not callable -- lost.

On Wed, Jan 30, 2013 at 6:59 PM, Maurice Asimov <> wrote:
> Hey guys.
> I recently started getting a ValueError complaining that an str is not
> callable -- in a very wierd place.
> This happens to some calls to, 'somethingsomething'),
> in one of those cases __inside the django console__
> Any other ideas what's wrong? Anyone bumped into this?
> The same problem occured in part of the app I control, removing the call to
> solved it.
> Anything at all? Thanks.

Somehow, you have overwritten the 'info' attribute of the
django.messages module with a string, and so it blows up.

Look for places where you assign to anything named 'info':

ack "\Winfo.*="
ack "setattr\([^,]*,.*info"


grep -r "[^a-z_]info.*=" *
grep -r "setattr([^,]*,.*info" *

I know you said not to blame your custom middleware, but this does not
happen with stock 1.4.2, so if you have this happening even in
requests that do not touch your views, it most likely will be your

It would be easy to test if you can reliably reproduce this in the
admin site, simply disable the custom middleware and see if you can
still reproduce the error.



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
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment