Skip to content Skip to sidebar Skip to footer

How To Solve Unicodedecodeerror In Mezzanine?

I am using mezzanine cms. When I scrap the data from the blogspot I got this error blog_id: sanavitastudio Traceback (most recent call last): File '/home/nyros/hs/git_br/2013/Oct

Solution 1:

Ah, so now with the code the problem is most likely with request.user.username unfortunately the mezzanine code assumes it is receiving an ascii object (what unicode(self) in the stacktrace is doing) and is "double encoding" it... grrr!

I would call your method the same way but do this:

call_command(
    'import_blogger_hs',
    mezzanine_user=request.user.username.decode('utf-8'),
    blog_id=blog_id)

Does that fix the issue?

Post a Comment for "How To Solve Unicodedecodeerror In Mezzanine?"