Mario,

On Tue, 2007-07-31 at 15:40 +0000, Mario Gonzalez wrote:
[...]
>   Django (I think) is trying to encode an ascii string. I modified
> django/template/__init__.py line 704 and just for testing purposes I
> deleted raise and I changed it by print e
> 
> Index: __init__.py
> ===================================================================
> --- __init__.py (revision 5779)
> +++ __init__.py (working copy)
> @@ -700,7 +700,8 @@
>                      if getattr(e, 'silent_variable_failure', False):
>                          current = settings.TEMPLATE_STRING_IF_INVALID
>                      else:
> -                        raise
> +                        print e
> +                        #raise
>              del bits[0]
>      if isinstance(current, (basestring, Promise)):
>          try:

I was thinking about this a bit more and the place the exception is
coming from is a clue. It's being raised from the current=current() call
on line 680. So you might be able to get further by print out what
"current" is just before that line (current.__name__, since it should be
a function by that point). It is somewhere inside current() that the
exception is being created.

You might also get some more clues by printing out the current stack
trace when the exception is raised (import traceback and
traceback.print_stack()). That *might* tell you which function is the
real problem.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to