Skip to content

Using utf-8 in series alternate_name causes crash #2373

@vindaddo

Description

@vindaddo

Actual behaviour:

All series feeds will occasionally crash with the following message: "UnicodeEncodeError: 'ascii' codec can't encode character u'\xd3' in position 0: ordinal not in range(128)".

Steps to reproduce:

I can't reproduce this on demand with my real config, I don't know what specifically triggers it, but I have 120 cash_report files dating back to 02.05 when the problem began. The problem can be reliably reproduced using the below minimal config in a clean directory.

Config:

tasks:
  ettv:
    rss:
      url: https://www.ettv.to/rss.php?cat=5
    series:
      - Trapped:
          alternate_name: [ Ófærð, Ofaero ]

Log:

(click to expand)
    2019-04-24 17:47 CRITICAL task          ettv            BUG: Unhandled error in plugin series_db: 'ascii' codec can't encode character u'\xd3' in position 0: ordinal not in range(128)
    Traceback (most recent call last):
    File "/Users/vi/src/Flexget/flexget/task.py", line 522, in __run_plugin
        return method(*args, **kwargs)
    File "/Users/vi/src/Flexget/flexget/event.py", line 23, in __call__
        return self.func(*args, **kwargs)
    File "/Users/vi/src/Flexget/flexget/components/series/series.py", line 1141, in on_task_start
        db._add_alt_name(alt, db_series, series_name, session)
    File "/Users/vi/src/Flexget/flexget/components/series/db.py", line 879, in _add_alt_name
        alt = str(alt)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xd3' in position 0: ordinal not in range(128)

Additional information:

  • FlexGet version: 2.20.21
  • Python version: 2.7.16
  • Installation method: git
  • Using daemon (yes/no): no
  • OS and version: macOS 10.14.4
  • Link to crash log: https://pastebin.com/raw/nGLffZzH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions