Here is the stack:
TypeError at /databrowse/ coercing to Unicode: need string or buffer, __proxy__ found Request Method: GET Request URL: http://pan.dynalias.com/databrowse/ Exception Type: TypeError Exception Value: coercing to Unicode: need string or buffer, __proxy__ found Exception Location: /usr/lib/python2.4/site-packages/django/utils/ encoding.py in force_unicode, line 37 Python Executable: /usr/bin/python Python Version: 2.4.3 Template error In template /usr/lib/python2.4/site-packages/django/contrib/databrowse/ templates/databrowse/homepage.html, error at line 9 Caught an exception while rendering: coercing to Unicode: need string or buffer, __proxy__ found 1 {% extends "databrowse/base.html" %} 2 3 {% block title %}Databrowse{% endblock %} 4 5 {% block bodyid %}homepage{% endblock %} 6 7 {% block content %} 8 9 {% for model in model_list %} 10 <div class="modelgroup {% cycle even,odd %}"> 11 <h2><a href="{{ model.url }}">{{ model.verbose_name_plural| capfirst }}</a></h2> 12 <p> 13 {% for object in model.sample_objects %} 14 <a href="{{ object.url }}">{{ object|escape }}</a>, 15 {% endfor %} 16 <a class="more" href="{{ model.url }}">More →</a> 17 </p> 18 </div> 19 {% endfor %} Traceback (innermost last) Switch to copy-and-paste view * /usr/lib/python2.4/site-packages/django/template/__init__.py in render_node 747. 748. def render_node(self, node, context): 749. return node.render(context) 750. 751. class DebugNodeList(NodeList): 752. def render_node(self, node, context): 753. try: 754. result = node.render(context) ... 755. except TemplateSyntaxError, e: 756. if not hasattr(e, 'source'): 757. e.source = node.source 758. raise 759. except Exception, e: 760. from sys import exc_info ▼ Local vars Variable Value context [{'forloop': {'parentloop': {}, 'last': True, 'counter': 1, 'revcounter0': 0, 'revcounter': 1, 'counter0': 0, 'first': True}, u'model': <EasyModel for Book>}, {'block': <Block Node: content. Contents: [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Book>]}] e <exceptions.TypeError instance at 0xb73489ec> exc_info <built-in function exc_info> node <For Node: for model in model_list, tail_len: 11> self [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>] wrapped <django.template.TemplateSyntaxError instance at 0xb734894c> * /usr/lib/python2.4/site-packages/django/template/defaulttags.py in render 127. } 128. if unpack: 129. # If there are multiple loop variables, unpack the item into them. 130. context.update(dict(zip(self.loopvars, item))) 131. else: 132. context[self.loopvars[0]] = item 133. for node in self.nodelist_loop: 134. nodelist.append(node.render(context)) ... 135. if unpack: 136. # The loop variables were pushed on to the context so pop them 137. # off again. This is necessary because the tag lets the length 138. # of loopvars differ to the length of each set of items and we 139. # don't want to leave any vars from the previous loop on the 140. # context. ▼ Local vars Variable Value context [{'forloop': {'parentloop': {}, 'last': True, 'counter': 1, 'revcounter0': 0, 'revcounter': 1, 'counter0': 0, 'first': True}, u'model': <EasyModel for Book>}, {'block': <Block Node: content. Contents: [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Book>]}] i 0 item <EasyModel for Book> len_values 1 node <Variable Node: model.verbose_name_plural|capfirst> nodelist [u'\n <div class="modelgroup ', u'even', u'">\n\t <h2><a href="', u'/databrowse/book/book/', u'">'] parentloop {} self <For Node: for model in model_list, tail_len: 11> unpack False values [<EasyModel for Book>] * /usr/lib/python2.4/site-packages/django/template/__init__.py in render 783. 784. def render(self, context): 785. return self.filter_expression.resolve(context) 786. 787. class DebugVariableNode(VariableNode): 788. def render(self, context): 789. try: 790. return self.filter_expression.resolve(context) ... 791. except TemplateSyntaxError, e: 792. if not hasattr(e, 'source'): 793. e.source = self.source 794. raise 795. 796. def generic_tag_compiler(params, defaults, name, node_class, parser, token): ▼ Local vars Variable Value context [{'forloop': {'parentloop': {}, 'last': True, 'counter': 1, 'revcounter0': 0, 'revcounter': 1, 'counter0': 0, 'first': True}, u'model': <EasyModel for Book>}, {'block': <Block Node: content. Contents: [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Book>]}] self <Variable Node: model.verbose_name_plural|capfirst> * /usr/lib/python2.4/site-packages/django/template/__init__.py in resolve 575. upto = match.end() 576. if upto != len(token): 577. raise TemplateSyntaxError, "Could not parse the remainder: '%s' from '%s'" % (token[upto:], token) 578. self.var, self.filters = var, filters 579. 580. def resolve(self, context, ignore_failures=False): 581. try: 582. obj = resolve_variable(self.var, context) ... 583. except VariableDoesNotExist: 584. if ignore_failures: 585. obj = None 586. else: 587. if settings.TEMPLATE_STRING_IF_INVALID: 588. global invalid_var_format_string ▼ Local vars Variable Value context [{'forloop': {'parentloop': {}, 'last': True, 'counter': 1, 'revcounter0': 0, 'revcounter': 1, 'counter0': 0, 'first': True}, u'model': <EasyModel for Book>}, {'block': <Block Node: content. Contents: [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Book>]}] ignore_failures False self <django.template.FilterExpression object at 0xb734280c> * /usr/lib/python2.4/site-packages/django/template/__init__.py in resolve_variable 700. if getattr(e, 'silent_variable_failure', False): 701. current = settings.TEMPLATE_STRING_IF_INVALID 702. else: 703. raise 704. del bits[0] 705. if isinstance(current, (basestring, Promise)): 706. try: 707. current = force_unicode(current) ... 708. except UnicodeDecodeError: 709. # Failing to convert to unicode can happen sometimes (e.g. debug 710. # tracebacks). So we allow it in this particular instance. 711. pass 712. return current 713. ▼ Local vars Variable Value bits [] context [{'forloop': {'parentloop': {}, 'last': True, 'counter': 1, 'revcounter0': 0, 'revcounter': 1, 'counter0': 0, 'first': True}, u'model': <EasyModel for Book>}, {'block': <Block Node: content. Contents: [<Text Node: '\n\n'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: '\n\n'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Book>]}] current u'books' path u'model.verbose_name_plural' * /usr/lib/python2.4/site-packages/django/utils/encoding.py in force_unicode 30. 31. If strings_only is True, don't convert (some) non-string- like objects. 32. """ 33. if strings_only and isinstance(s, (types.NoneType, int)): 34. return s 35. if not isinstance(s, basestring,): 36. if hasattr(s, '__unicode__'): 37. s = unicode(s) ... 38. else: 39. s = unicode(str(s), encoding, errors) 40. elif not isinstance(s, unicode): 41. s = unicode(s, encoding, errors) 42. return s 43. ▼ Local vars Variable Value encoding u'utf-8' errors u'strict' s u'books' strings_only False On Aug 10, 2:37 pm, Michael Radziej <[EMAIL PROTECTED]> wrote: > On Fri, Aug 10, paulh wrote: > > > I have tried the databrowse app on a couple of projects, but it fails > > on both with the same error. I wondered whether anyone else has seen > > this error message: > > > coercing to Unicode: need string or buffer, __proxy__ found > > > If you need the whole stack, let me know. > > Might be a bug, please provide the whole stack. > > Michael > > -- > noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - > Tel +49-911-9352-0 - Fax +49-911-9352-100http://www.noris.de- The > IT-Outsourcing Company > > Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel, Hansjochen Klenk - > Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

