Anomalie #79
ferméBUG in general access
100%
Description
Then trying to connect to Ishtar (with empty cache) :
TypeError at /ishtar/
sequence item 0: expected string or Unicode, proxy found
Request Method: GET
Request URL: http://lysithea.proxience.com/ishtar/
Django Version: 1.2.3
Exception Type: TypeError
Exception Value:
sequence item 0: expected string or Unicode, proxy found
Exception Location: /var/local/ishtar/ishtar/furnitures/models.py in unicode, line 277
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path: ['/var/local/ishtar/', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6']
Server time: mar, 11 Jan 2011 14:17:14 +0100
Traceback Switch to copy-and-paste view
* /usr/lib/pymodules/python2.6/django/core/handlers/base.py in get_response
93. # Apply view middleware
94. for middleware_method in self._view_middleware:
95. response = middleware_method(request, callback, callback_args, callback_kwargs)
96. if response:
97. return response
98.
99. try:
100. response = callback(request, *callback_args, **callback_kwargs) ...
101. except Exception, e:
102. # If the view raised an exception, run it through exception
103. # middleware, and if the exception middleware returns a
104. # response, use that. Otherwise, reraise the exception.
105. for middleware_method in self._exception_middleware:
106. response = middleware_method(request, e)
▶ Local vars
Variable Value
callback
<function index at 0x7f810dc41de8>
callback_args
()
callback_kwargs
{}
e
TypeError('sequence item 0: expected string or Unicode, __proxy__ found',)
exceptions
<module 'django.core.exceptions' from '/usr/lib/pymodules/python2.6/django/core/exceptions.pyc'>
middleware_method
<bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f810d221990>>
receivers
[(<function _rollback_on_exception at 0x7f810d053230>, None)]
request
<ModPythonRequest path:/ishtar/, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'b6828b56a02c1e76e43781c2f3fa9c67', 'sessionid': 'f103b935937ca76cc8bd4e17b0b32ed7'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0, 'CONTENT_TYPE': None, 'CSRF_COOKIE': 'b6828b56a02c1e76e43781c2f3fa9c67', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-stale=0', 'HTTP_CLIENT_IP': '143.126.144.2', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'csrftoken=b6828b56a02c1e76e43781c2f3fa9c67; sessionid=f103b935937ca76cc8bd4e17b0b32ed7', 'HTTP_HOST': 'lysithea.proxience.com', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)', 'HTTP_X_BLUECOAT_VIA': '1653EDCF90CC082F, ad355d1e6176f675', 'HTTP_X_FORWARDED_FOR': '143.126.144.2', 'PATH_INFO': u'/ishtar/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '143.126.201.152', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': 'lysithea.proxience.com', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
resolver
<RegexURLResolver ishtar.urls (None:None) ^/>
response
None
self
<django.core.handlers.modpython.ModPythonHandler object at 0x7f810dfec310>
settings
<django.conf.LazySettings object at 0x7f80f7280950>
urlconf
'ishtar.urls'
urlresolvers
<module 'django.core.urlresolvers' from '/usr/lib/pymodules/python2.6/django/core/urlresolvers.pyc'>
* /var/local/ishtar/ishtar/furnitures/views.py in index
37.
38. def index(request):
39. """
40. Main page
41. """
42. dct = {}
43. return render_to_response('index.html', dct,
44. context_instance=RequestContext(request)) ...
45.
46. def update_current_item(request):
47. if not request.is_ajax() and not request.method == 'POST':
48. return Http404()
49. print request.POST
50. if 'value' in request.POST and 'item' in request.POST:
▶ Local vars
Variable Value
dct
{}
request
<ModPythonRequest path:/ishtar/, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'b6828b56a02c1e76e43781c2f3fa9c67', 'sessionid': 'f103b935937ca76cc8bd4e17b0b32ed7'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0, 'CONTENT_TYPE': None, 'CSRF_COOKIE': 'b6828b56a02c1e76e43781c2f3fa9c67', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-stale=0', 'HTTP_CLIENT_IP': '143.126.144.2', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'csrftoken=b6828b56a02c1e76e43781c2f3fa9c67; sessionid=f103b935937ca76cc8bd4e17b0b32ed7', 'HTTP_HOST': 'lysithea.proxience.com', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)', 'HTTP_X_BLUECOAT_VIA': '1653EDCF90CC082F, ad355d1e6176f675', 'HTTP_X_FORWARDED_FOR': '143.126.144.2', 'PATH_INFO': u'/ishtar/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '143.126.201.152', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': 'lysithea.proxience.com', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
* /usr/lib/pymodules/python2.6/django/template/context.py in __init__
142. def __init__(self, request, dict=None, processors=None, current_app=None):
143. Context.__init__(self, dict, current_app=current_app)
144. if processors is None:
145. processors = ()
146. else:
147. processors = tuple(processors)
148. for processor in get_standard_processors() + processors:
149. self.update(processor(request)) ...
▶ Local vars
Variable Value
current_app
None
dict
None
processor
<function get_base_context at 0x7f810dc49b90>
processors
()
request
<ModPythonRequest path:/ishtar/, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'b6828b56a02c1e76e43781c2f3fa9c67', 'sessionid': 'f103b935937ca76cc8bd4e17b0b32ed7'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0, 'CONTENT_TYPE': None, 'CSRF_COOKIE': 'b6828b56a02c1e76e43781c2f3fa9c67', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-stale=0', 'HTTP_CLIENT_IP': '143.126.144.2', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'csrftoken=b6828b56a02c1e76e43781c2f3fa9c67; sessionid=f103b935937ca76cc8bd4e17b0b32ed7', 'HTTP_HOST': 'lysithea.proxience.com', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)', 'HTTP_X_BLUECOAT_VIA': '1653EDCF90CC082F, ad355d1e6176f675', 'HTTP_X_FORWARDED_FOR': '143.126.144.2', 'PATH_INFO': u'/ishtar/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '143.126.201.152', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': 'lysithea.proxience.com', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
self
[{}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x7f810d221690>}]
* /var/local/ishtar/ishtar/furnitures/context_processors.py in get_base_context
40. dct['JQUERY_UI_URL'] = settings.JQUERY_UI_URL
41. dct['current_menu'] = []
42. for lbl, model in ((_(u"Archaelogical file"), models.File),):
43. model_name = model.__name__.lower()
44. current = model_name in request.session and request.session[model_name]
45. items = []
46. for item in model.get_owns(request.user):
47. items.append((item.pk, unicode(item), unicode(item.pk) == current)) ...
48. if items:
49. dct['current_menu'].append((lbl, model_name, items))
50. return dct
51.
▶ Local vars
Variable Value
current
False
dct
{'APP_NAME': u'SRA Pays de la Loire', 'COUNTRY': 'fr', 'JQUERY_UI_URL': '/javascript/jquery-ui/', 'JQUERY_URL': '/javascript/jquery/jquery.js', 'MENU': <ishtar.furnitures.menus.Menu instance at 0x7f810dfe6f80>, 'URL_PATH': 'ishtar/', 'current_menu': []}
item
Error in formatting: sequence item 0: expected string or Unicode, __proxy__ found
items
[(2, u'Le Maisnil - 2011 - 01', False), (10, u'Le Maisnil - 2011 - 12', False), (9, u'Le Maisnil - 2011 - 14', False), (8, u'Le Maisnil - 2011 - 15', False), (7, u'Le Maisnil - 2011 - 2', False), (6, u'Le Maisnil - 2011 - 12', False), (5, u'Le Maisnil - 2011 - 1', False), (4, u'Le Maisnil - 2011 - truv', False), (3, u'Le Maisnil - 2011 - yt', False), (19, u'Le Maisnil - 2011 - 19 - ZAC du bidul', False), (15, u"Le Maisnil - 2011 - 18 - ZAC de l'hor", False), (17, u'Le Maisnil - 2011 - 17 - Decouverte f', False), (18, u'Le Maisnil - 2011 - 12 - Decouverte f', False), (16, u'Le Maisnil - 2011 - 9 - Lotissement ', False), (14, u'Le Maisnil - 2011 - 6 - 78', False), (13, u'Le Maisnil - 2011 - 5 - 451', False), (11, u'Le Maisnil - 2011 - 3 - sdfg', False)]
lbl
<django.utils.functional.__proxy__ object at 0x7f810d221790>
model
<class 'ishtar.furnitures.models.File'>
model_name
'file'
request
<ModPythonRequest path:/ishtar/, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'b6828b56a02c1e76e43781c2f3fa9c67', 'sessionid': 'f103b935937ca76cc8bd4e17b0b32ed7'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0, 'CONTENT_TYPE': None, 'CSRF_COOKIE': 'b6828b56a02c1e76e43781c2f3fa9c67', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-stale=0', 'HTTP_CLIENT_IP': '143.126.144.2', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 'csrftoken=b6828b56a02c1e76e43781c2f3fa9c67; sessionid=f103b935937ca76cc8bd4e17b0b32ed7', 'HTTP_HOST': 'lysithea.proxience.com', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)', 'HTTP_X_BLUECOAT_VIA': '1653EDCF90CC082F, ad355d1e6176f675', 'HTTP_X_FORWARDED_FOR': '143.126.144.2', 'PATH_INFO': u'/ishtar/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '143.126.201.152', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': 'lysithea.proxience.com', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
* /var/local/ishtar/ishtar/furnitures/models.py in __unicode__
270. def __unicode__(self):
271. items = [_('Intercommunal')]
272. if self.towns.count() == 1:
273. items[0] = unicode(self.towns.all()[0])
274. items += [unicode(getattr(self, k))[:12] for k in ['year',
275. 'numeric_reference', 'internal_reference',]
276. if getattr(self, k)]
277. return u" - ".join(items) ...
278.
279. @classmethod
280. def get_owns(cls, user, order_by=['-year', '-numeric_reference']):
281. if user.is_anonymous():
282. return []
283. return cls.objects.filter(history_modifier=user).order_by(*order_by
▶ Local vars
Mis à jour par Anonyme il y a presque 14 ans
- % réalisé changé de 0 à 100
- Statut changé de Nouveau à Fermé
Appliqué par commit commit:"ae2ad5289216baa604cf5b1ea6988410f64499b6".