3

When I use django debug toolbar, I get the following error:

MultiValueDictKeyError at /__debug__/render_panel/
"'store_id'"

What am I doing wrong?

Chris Hansen
  • 7,813
  • 15
  • 81
  • 165

2 Answers2

1

You shouldn't call that. Debug toolbar should be on your page and should use it to get your debugging done.

mrek
  • 1,655
  • 1
  • 21
  • 34
0

Got this error all of a sudden. Not sure what triggered it, but noticed the javascript was now requesting: "GET /__debug__/render_panel/?%5Bobject+Object%5D= HTTP/1.1" 500

Replicated by opening a console in Safari and Chrome and typing:

new URLSearchParams({"a":1}).toString(); which returns: "%5Bobject+Object%5D="

Was able to patch in toolbar.js with:

var url = djDebug.getAttribute('data-render-panel-url');
var url_params = new URLSearchParams();
url_params.append('store_id', store_id);
url_params.append('panel_id', this.className);
url += '?' + url_params.toString();

Issue link: https://github.com/jazzband/django-debug-toolbar/issues/816

scum
  • 3,202
  • 1
  • 29
  • 27