edhaker13 / myanimelist

MyAnimeList plugin for FlexGet
10 stars 3 forks source link

Non-Ascii characters in anime name break Flexget #10

Closed Drewbadour closed 6 years ago

Drewbadour commented 6 years ago

Maybe I'm barking up the wrong tree and the issue is with Filebot handling non-ascii character incorrectly, but I thought I'd check here just to make sure.

When running: flexget execute --tasks HorribleSubs With config.yml including:

templates:
  anime:
    include: anime.yml
    configure_series:
      from:
        myanimelist:
          username: <MAL_USERNAME>
          list: watching
      settings:
        identified_by: sequence
        quality: 1080p
        special_ids:
          - OVA

tasks:
  HorribleSubs:
    priority: 1
    rss: http://horriblesubs.info/rss.php?res=1080
    template:
      - anime

I receive this output for a MAL containing Saiki Kusuo no Ψ-nan (TV) 2:

2018-03-22 12:39 VERBOSE  task_queue                    There are 1 tasks to execute. Shutdown will commence when they have completed.
2018-03-22 12:39 VERBOSE  myanimelist   HorribleSubs    Retrieving MyAnimeList on http://myanimelist.net/malappinfo.php?u=<MAL_USERNAME>&status=all&type=anime.
2018-03-22 12:39 CRITICAL plugin        HorribleSubs    Error adding alternate name for `Saiki Kusuo no Ψ-nan (TV) 2`: `Saiki Kusuo no Psi Nan 2` is already associated with `Saiki Kusuo no Ψ-nan 2`. Check your settings.
2018-03-22 12:39 WARNING  task          HorribleSubs    Aborting task (plugin: series_db)
Exception in thread task_queue:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/task_queue.py", line 50, in run
    log.debug('task %s aborted: %r' % (self.current_task.name, e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u03a8' in position 65: ordinal not in range(128)

Thanks in advance.

Drewbadour commented 6 years ago

This seems to fix and break itself as time goes on. I'll keep monitoring it, but mark it as resolved for me.