django-debug-toolbar blows up when saving binary object in db. Is there a workaround?

I'm using the django-debug-toolbar, and when I try to save something in a blob field I get:

DjangoUnicodeDecodeError

looking through the stack trace it come from:

django_debug_toolbar-0.8.4-py2.6.egg/debug_toolbar/panels/sql.py in execute
98. _params = simplejson.dumps([force_unicode(x, strings_only=True) for x in params]) 

Is there any workaround to this issue? (besides saving the binary object somewhere on the file system)

Answers


My thought would be to break out that list comprehension into a traditional for loop, and wrap a try/except around it so it doesn't throw an exception. In the except clause, simply add something like "Non-unicode object" for the output.

There is nothing currently built-in to work around this, sorry.


Need Your Help

Swift: could not find an overload for ' ' that accepts the supplied arguments

animation uiview double swift

So what I need is an image to rotate continuously. The problem is at

Contact sync adapter in android

android sync android-syncadapter

I want to use sync adapter in my application to sync the native and third party contacts (except FB) with server. ( Only client to server one way sync)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.