On Tue, Feb 10, 2009 at 2:55 PM, DaSa <daniel.sandb...@gmail.com> wrote:
> > The traceback: > > Environment: > > Request Method: POST > Request URL: http://127.0.0.1:8000/admin/polls/poll/add/ > Django Version: 1.0.2 final > Python Version: 2.5.3 > [snip] > File "C:\Python25\Lib\site-packages\django\utils\encoding.py" in > force_unicode > 52. s = unicode(str(s), encoding, errors) > > Exception Type: UnicodeEncodeError at /admin/polls/poll/add/ > Exception Value: 'ascii' codec can't encode character u'\xe5' in > position 6: ordinal not in range(128) > Your original note showed a model named "MyClass", here you seem to be dealing with adding a "poll" object. The line of code you have reached here implies your Poll class does not have a __unicode__ method, and the fix would be to add a __unicode__ method to Poll. However your original note shows MyClass as having a __unicode__ method, so this traceback isn't very helpful in identifying what is wrong in your MyClass case, since for the model you originally showed, you would not have reached this last line of code. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---