Ticket #525 (new defect)

  • Remember to check that the log messages do not contain personal information.
  • Tickets containing names or links to copyrighted material will be deleted. Clean them out!
  • For more permissions: register or login with flexget / anon
  • Format your config and logs with {{{ ... }}} wiki formatting

Opened 6 months ago

Last modified 6 months ago

fix unicode once and for all

Reported by: paranoidi Owned by: paranoidi
Priority: blocker Milestone: 1.0
Component: Core Version:
Keywords: Cc:

Description

Unicode printing problems are handled in various equally wrong ways trough application.

Fix using filtering presented in  http://wiki.python.org/moin/PrintFails

Warn user if FlexGet is not capable of UTF-8 printing.

Other resources:

 http://drj11.wordpress.com/2007/05/14/python-how-is-sysstdoutencoding-chosen/

 http://farmdev.com/talks/unicode/

Change History

in reply to: ↑ description   Changed 6 months ago by rabbitear

The "2006" podcast is an example of a unicode xml that doesn't seem to work with the version I have.

FlexGet? 1.0r1197

MY CONFIG

feeds:
  off_the_hook:
    rss: 
      url: http://www.2600.com/oth-broadband.xml
      ascii: yes
    limit_new: 2
    regexp:
      accept:
        - off.the.hook.*mp3$
    exec: wget -b -c -a ~/wget-flex.log -P ~/shared-read/Audio-Podcasts %(url)s

ITS ERRORS

2010-03-19 02:45 ERROR    feed          off_the_hook    Unhandled error in plugin rss: 'ascii' codec can't decode byte 0xf7 in position 1: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/FlexGet-1.0r1197-py2.6.egg/flexget/feed.py", line 319, in __run_event
    method(self)
  File "/usr/lib/python2.6/site-packages/FlexGet-1.0r1197-py2.6.egg/flexget/plugin.py", line 259, in __call__
    return getattr(self.plugin.instance, self.method_name)(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/FlexGet-1.0r1197-py2.6.egg/flexget/plugins/cached_input.py", line 62, in wrapped_func
    func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/FlexGet-1.0r1197-py2.6.egg/flexget/plugin.py", line 79, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/FlexGet-1.0r1197-py2.6.egg/flexget/plugins/input_rss.py", line 233, in on_feed_input
    entry.title = entry.title.encode('ascii', 'ignore')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf7 in position 1: ordinal not in range(128)
2010-03-19 02:45 INFO     feed          off_the_hook    Aborting feed (plugin: rss)

ps: I'd take any advice :)

Note: See TracTickets for help on using tickets.