django-debug-toolbar: 'list' does not support the buffer interface -
i made few modifications model, adding image fields , installing pillow, deleteing models or model fields.
as site not yet in production, dropped database , re-created it, , synced it. got error.
i can't figure out source of sudden error. in settings.py added media_root nothing else.
environment: request method: request url: http://localhost:8000/ django version: 1.6.2 python version: 3.4.0 installed applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'backoffice', 'public', 'django.contrib.sites', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.google', 'allauth.socialaccount.providers.twitter', 'widget_tweaks', 'rosetta', 'debug_toolbar', 'template_debug') installed middleware: ('debug_toolbar.middleware.debugtoolbarmiddleware', 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.locale.localemiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', 'django.middleware.clickjacking.xframeoptionsmiddleware') template error: in template c:\python34\lib\site-packages\debug_toolbar\templates\debug_toolbar\base.html, error @ line 5 'list' not support buffer interface 1 : {% load i18n %}{% load static staticfiles %}{% load url future %} 2 : <style type="text/css"> 3 : @media print { #djdebug {display:none;}} 4 : </style> 5 : <link rel="stylesheet" href=" {% static 'debug_toolbar/css/toolbar.css' %} " type="text/css" /> 6 : {% if toolbar.config.jquery_url %} 7 : <script src="{{ toolbar.config.jquery_url }}"></script> 8 : <script>var djdt = {jquery: jquery.noconflict(true)};</script> 9 : {% else %} 10 : <script>var djdt = {jquery: jquery};</script> 11 : {% endif %} 12 : <script src="{% static 'debug_toolbar/js/toolbar.js' %}"></script> 13 : <div id="djdebug" style="display:none;" dir="ltr" 14 : data-store-id="{{ toolbar.store_id }}" data-render-panel-url="{% url 'djdt:render_panel' %}" 15 : {{ toolbar.config.root_tag_extra_attrs|safe }}> traceback: file "c:\python34\lib\site-packages\django\core\handlers\base.py" in get_response 201. response = middleware_method(request, response) file "c:\python34\lib\site-packages\debug_toolbar\middleware.py" in process_response 121. bits[-2] += toolbar.render_toolbar() file "c:\python34\lib\site-packages\debug_toolbar\toolbar.py" in render_toolbar 68. return render_to_string('debug_toolbar/base.html', context) file "c:\python34\lib\site-packages\django\template\loader.py" in render_to_string 164. return t.render(context(dictionary)) file "c:\python34\lib\site-packages\django\template\base.py" in render 140. return self._render(context) file "c:\python34\lib\site-packages\django\test\utils.py" in instrumented_test_render 85. return self.nodelist.render(context) file "c:\python34\lib\site-packages\django\template\base.py" in render 840. bit = self.render_node(node, context) file "c:\python34\lib\site-packages\django\template\debug.py" in render_node 78. return node.render(context) file "c:\python34\lib\site-packages\django\templatetags\static.py" in render 106. url = self.url(context) file "c:\python34\lib\site-packages\django\contrib\staticfiles\templatetags\staticfiles.py" in url 12. return staticfiles_storage.url(path) file "c:\python34\lib\site-packages\django\utils\functional.py" in inner 213. self._setup() file "c:\python34\lib\site-packages\django\contrib\staticfiles\storage.py" in _setup 311. self._wrapped = get_storage_class(settings.staticfiles_storage)() file "c:\python34\lib\site-packages\django\contrib\staticfiles\storage.py" in __init__ 37. *args, **kwargs) file "c:\python34\lib\site-packages\django\core\files\storage.py" in __init__ 154. self.location = abspathu(self.base_location) file "c:\python34\lib\ntpath.py" in abspath 545. path = _getfullpathname(path) exception type: typeerror @ / exception value: 'list' not support buffer interface
all right, fault. error in fact pretty explicit.
unlike template_dirs, media_root not supposed list.
django debug toolbar return error every time mess variables types in "settings.py" file.
in case similar mistakes, i'll leave q&a here.
Comments
Post a Comment