Thanks for your reply. I'll give more information: # c:\django_src\django\core\handlers\base.py in get_response
77. response = callback(request, *callback_args, **callback_kwargs) ... # c:\django_src\django\contrib\syndication\views.py in feed 19. feedgen = f(slug, request.path).get_feed(param) ... # c:\django_src\django\contrib\syndication\feeds.py in get_feed 81. feed_url = add_domain(current_site, self.__get_dynamic_attr('feed_url', obj)), ... # c:\django_src\django\contrib\syndication\feeds.py in add_domain 13. url = u'http://%s%s' % (domain, url) ... print repr(domain) and print repr(url) in add_comain produces u'www.example.com' '/gie%C3%9Fen/' <Site: www.example.com> '/feeds/gie\xc3\x9fen/' You are right when you say that request.path is never passed directly to add_domain, the error occurs when it uses feed_url. feed_url is passed to the feed object from request.path On Jul 6, 4:00 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-06 at 06:51 -0700, web-junkie wrote: > > Hi, I have a problem of getting my feeds to work with unicode URLs. > > > File "/usr/local/lib/python2.4/site-packages/django/contrib/ > > syndication/feeds.py", line 12, in add_domain > > url = u'http://%s%s' % (domain, url) > > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > > 19: ordinal not in range(128) > > You're only showing the last line of the traceback here. What is the > full traceback? In particular, I would like to see which of the calls to > add_domain() is triggering this. > > Can you also print out the values of "domain" and "url" inside that > function -- or rather, print out repr(domain) and repr(url)? The easiest > way to do this is change the source to catch UnicodeDecodeError in > add_domain and then print out the values to sys.stderr and re-raise the > exception. > > > > > In all my models I correctly encoded and quoted the URLs, I traced the > > problem back to the request.path not being correctly quoted when it is > > passed to the feed object. > > request.path is never passed directly to add_domain(), so it would help > if you could explain this a little more. In particular, whenever > add_domain() is called, it is using either the "link", "item_link" or > "feed_url" attributes from your Feed class. If you can show us the code > that is constructing each of those attributes, that would make things > easier to work out what is going on. > > > > > There seems to be a bug or I'm doing something wrong, please help. > > It's not impossible that this is a bug, but you haven't given enough > information to determine that. Show us the code that you've written to > create these URLs and we should be able to get closer to a solution. > > Regards, > Malcolm > > -- > The early bird may get the worm, but the second mouse gets the > cheese.http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---