Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DjangoUnicodeDecodeError when deleting tag #20

Closed
hepi opened this issue May 8, 2010 · 4 comments
Closed

DjangoUnicodeDecodeError when deleting tag #20

hepi opened this issue May 8, 2010 · 4 comments

Comments

@hepi
Copy link

hepi commented May 8, 2010

Deleting tag from admin causes DjangoUnicodeDecodeError : 'ascii' codec can't decode byte 0xc4 in position 5: ordinal not in range(128). You passed in <TaggedItem: [Bad Unicode data]> (<class 'taggit.models.TaggedItem'>)

Changing 36 line of taggit/models.py from:
return "%s tagged with %s" % (self.content_object, self.tag)
to:
return u"%s tagged with %s" % (self.content_object, self.tag)
solves this error.

@alex
Copy link
Collaborator

alex commented May 8, 2010

Sounds reasonable to me, can you come up with a testcase for this?

@alex
Copy link
Collaborator

alex commented May 9, 2010

Fixed in cae0efe

@hepi
Copy link
Author

hepi commented May 10, 2010

Thanks!
"should now be safe on older pythons" - What versions did you mean? I had this issue with python 2.6.5.

@alex
Copy link
Collaborator

alex commented May 10, 2010

Hrm, I'm used to seeing those exceptions on older pythons where strings aren't upcast to unicode on certain operations. I guess this issue is slightly different.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants