pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.77k stars 275 forks source link

[APP SUBMITTED]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte #10875

Closed rosavanwinkle closed 2 years ago

rosavanwinkle commented 2 years ago

INFO

Python Version: 3.9.13 (main, Jul 26 2022, 13:12:30) [GCC 10.3.1 20211027] Operating System: Linux-4.15.18-seedhost-x86_64-with Locale: UTF-8 Branch: master Database: 44.19 Commit: pymedusa/Medusa@1c62acdc4e034951f00db31847bd00479e1db47c Link to Log: https://gist.github.com/5ebd48e1861cec9f3367f13704983ce8

ERROR

2022-08-16 14:07:13 ERROR    TORNADO :: [1c62acd] Uncaught exception in APIv2: UnicodeDecodeError('utf-8', b'\x80\x05\x95Q\x00\x00\x00\x00\x00\x00\x00\x8c\x11dogpile.cache.api\x94\x8c\x0bCachedValue\x94\x93\x94]\x94\x8c\nSubsPlease\x94a}\x94(\x8c\x02ct\x94GA\xd8\x01\xc3\x11R%(\x8c\x01v\x94K\x01u\x86\x94R\x94.', 0, 1, 'invalid start byte')
Request: PATCH /**********/medusa/api/v2/series/tvdb402637 (172.17.0.1)
With body:
{"config":{"aliases":[{"season":-1,"title":"Tensei Kenja no Isekai Life: Daini no Shokugyou o Ete, Sekai Saikyou ni Narimashita","custom":false},{"season":-1,"title":"Tensei Kenja no Isekai Life","custom":false}],"defaultEpisodeStatus":"Wanted","dvdOrder":false,"seasonFolders":true,"anime":true,"scene":false,"sports":false,"paused":false,"location":"/home/**********/Plex Media/Anime/My Isekai Life","airByDate":false,"subtitlesEnabled":false,"release":{"requiredWords":[],"ignoredWords":[],"requiredWordsExclude":false,"ignoredWordsExclude":false,"blacklist":["Tsundere-Raws","CHT"],"whitelist":["SubsPlease"]},"qualities":{"preferred":[32,128,512],"allowed":[32,128,512,1024,2048,4096,8192,16384,32768]},"airdateOffset":0,"showLists":["Anime"],"templates":false,"searchTemplates":[{"id":378,"title":"Tensei Kenja no Isekai Life: Daini no Shokugyou o Ete, Sekai Saikyou ni Narimashita","template":"%SN %0XE","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":379,"title":"Tensei Kenja no Isekai Life: Daini no Shokugyou o Ete, Sekai Saikyou ni Narimashita","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true},{"id":383,"title":"Tensei Kenja no Isekai Life","template":"%SN %0XE","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":384,"title":"Tensei Kenja no Isekai Life","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true},{"id":408,"title":"My Isekai Life","template":"%SN %AB","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":409,"title":"My Isekai Life","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true}]},"language":"en"}
Traceback (most recent call last):
  File "/app/medusa/ext/tornado/web.py", line 1704, in _execute
    result = await result
  File "/app/medusa/ext/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/app/medusa/medusa/server/api/v2/base.py", line 64, in async_call
    content = yield IOLoop.current().run_in_executor(executor, prepared)
  File "/app/medusa/ext/tornado/gen.py", line 762, in run
    value = future.result()
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/medusa/medusa/server/api/v2/series.py", line 176, in patch
    if patch_field and patch_field.patch(series, value):
  File "/app/medusa/medusa/server/api/v2/base.py", line 517, in patch
    setattr(target, self.attr, self.converter(value))
  File "/app/medusa/medusa/tv/base.py", line 63, in __setattr__
    super(TV, self).__setattr__(key, value)
  File "/app/medusa/medusa/tv/series.py", line 782, in whitelist
    self.release_groups.set_white_keywords(short_group_names(group_names))
  File "/app/medusa/medusa/helpers/anidb.py", line 96, in short_group_names
    short_group_list += get_short_group_name(group_name) or [group_name]
  File "", line 2, in get_short_group_name
  File "/app/medusa/ext/dogpile/cache/region.py", line 1577, in get_or_create_for_user_func
    return self.get_or_create(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1042, in get_or_create
    with Lock(
  File "/app/medusa/ext/dogpile/lock.py", line 185, in __enter__
    return self._enter()
  File "/app/medusa/ext/dogpile/lock.py", line 87, in _enter
    value = value_fn()
  File "/app/medusa/ext/dogpile/cache/region.py", line 977, in get_value
    value = self._get_from_backend(key)
  File "/app/medusa/ext/dogpile/cache/region.py", line 1264, in _get_from_backend
    return self._parse_serialized_from_backend(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1221, in _parse_serialized_from_backend
    metadata = json.loads(bytes_metadata)
  File "/usr/lib/python3.9/json/__init__.py", line 341, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

rosavanwinkle commented 2 years ago

INFO

Python Version: 3.9.13 (main, Jul 26 2022, 13:12:30) [GCC 10.3.1 20211027] Operating System: Linux-4.15.18-seedhost-x86_64-with Locale: UTF-8 Branch: master Database: 44.19 Commit: pymedusa/Medusa@1c62acdc4e034951f00db31847bd00479e1db47c Link to Log: No Log available

ERROR

2022-08-19 05:48:53 ERROR    TORNADO :: [1c62acd] Uncaught exception in APIv2: UnicodeDecodeError('utf-8', b'\x80\x05\x95P\x00\x00\x00\x00\x00\x00\x00\x8c\x11dogpile.cache.api\x94\x8c\x0bCachedValue\x94\x93\x94]\x94\x8c\tErai-raws\x94a}\x94(\x8c\x02ct\x94GA\xd8\x01\xc3\x0b)\xa0{\x8c\x01v\x94K\x01u\x86\x94R\x94.', 0, 1, 'invalid start byte')
Request: PATCH /**********/medusa/api/v2/series/tvdb380402 (172.17.0.1)
With body:
{"config":{"aliases":[{"season":-1,"title":"Hataraku Saibou BLACK","custom":false},{"season":-1,"title":"Cells at Work! Code BLACK","custom":true},{"season":-1,"title":"Cells at Work Code BLACK","custom":true}],"defaultEpisodeStatus":"Wanted","dvdOrder":false,"seasonFolders":true,"anime":true,"scene":true,"sports":false,"paused":false,"location":"/home/**********/Plex Media/Anime/Cells at Work! Code Black","airByDate":false,"subtitlesEnabled":false,"release":{"requiredWords":["SubsPlease"],"ignoredWords":[],"requiredWordsExclude":false,"ignoredWordsExclude":false,"blacklist":["Erai-raws","EMBER","DKB","SSA","Hi10","BakedFish"],"whitelist":["SubsPlease"]},"qualities":{"preferred":[32,128,512,1024,2048,4096,8192,16384,32768],"allowed":[32,128,512,1024,2048,4096,8192,16384,32768]},"airdateOffset":0,"showLists":["anime"],"templates":false,"searchTemplates":[{"id":69,"title":"Cells at Work! Code Black","template":"%SN %XAB","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":70,"title":"Cells at Work! Code Black","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true},{"id":71,"title":"Cells at Work Code BLACK","template":"%SN %0XE","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":72,"title":"Cells at Work Code BLACK","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true},{"id":73,"title":"Cells at Work! Code BLACK","template":"%SN %0XE","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":74,"title":"Cells at Work! Code BLACK","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true},{"id":75,"title":"Hataraku Saibou BLACK","template":"%SN %0XE","season":-1,"enabled":true,"default":true,"seasonSearch":false},{"id":76,"title":"Hataraku Saibou BLACK","template":"%SN Season","season":-1,"enabled":true,"default":true,"seasonSearch":true}]},"language":"en"}
Traceback (most recent call last):
  File "/app/medusa/ext/tornado/web.py", line 1704, in _execute
    result = await result
  File "/app/medusa/ext/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/app/medusa/medusa/server/api/v2/base.py", line 64, in async_call
    content = yield IOLoop.current().run_in_executor(executor, prepared)
  File "/app/medusa/ext/tornado/gen.py", line 762, in run
    value = future.result()
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/medusa/medusa/server/api/v2/series.py", line 176, in patch
    if patch_field and patch_field.patch(series, value):
  File "/app/medusa/medusa/server/api/v2/base.py", line 517, in patch
    setattr(target, self.attr, self.converter(value))
  File "/app/medusa/medusa/tv/base.py", line 63, in __setattr__
    super(TV, self).__setattr__(key, value)
  File "/app/medusa/medusa/tv/series.py", line 768, in blacklist
    self.release_groups.set_black_keywords(short_group_names(group_names))
  File "/app/medusa/medusa/helpers/anidb.py", line 96, in short_group_names
    short_group_list += get_short_group_name(group_name) or [group_name]
  File "", line 2, in get_short_group_name
  File "/app/medusa/ext/dogpile/cache/region.py", line 1577, in get_or_create_for_user_func
    return self.get_or_create(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1042, in get_or_create
    with Lock(
  File "/app/medusa/ext/dogpile/lock.py", line 185, in __enter__
    return self._enter()
  File "/app/medusa/ext/dogpile/lock.py", line 87, in _enter
    value = value_fn()
  File "/app/medusa/ext/dogpile/cache/region.py", line 977, in get_value
    value = self._get_from_backend(key)
  File "/app/medusa/ext/dogpile/cache/region.py", line 1264, in _get_from_backend
    return self._parse_serialized_from_backend(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1221, in _parse_serialized_from_backend
    metadata = json.loads(bytes_metadata)
  File "/usr/lib/python3.9/json/__init__.py", line 341, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

rosavanwinkle commented 2 years ago

INFO

Python Version: 3.9.13 (main, Jul 26 2022, 13:12:30) [GCC 10.3.1 20211027] Operating System: Linux-4.15.18-seedhost-x86_64-with Locale: UTF-8 Branch: master Database: 44.19 Commit: pymedusa/Medusa@1c62acdc4e034951f00db31847bd00479e1db47c Link to Log: No Log available

ERROR

2022-08-19 05:48:48 ERROR    Thread_0 :: [1c62acd] Exception generated: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
Traceback (most recent call last):
  File "/app/medusa/medusa/server/web/core/base.py", line 252, in async_call
    result = function(**kwargs)
  File "/app/medusa/medusa/server/web/home/handler.py", line 1015, in fetch_releasegroups
    groups = get_release_groups_for_anime(series_name)
  File "", line 2, in get_release_groups_for_anime
  File "/app/medusa/ext/dogpile/cache/region.py", line 1577, in get_or_create_for_user_func
    return self.get_or_create(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1042, in get_or_create
    with Lock(
  File "/app/medusa/ext/dogpile/lock.py", line 185, in __enter__
    return self._enter()
  File "/app/medusa/ext/dogpile/lock.py", line 87, in _enter
    value = value_fn()
  File "/app/medusa/ext/dogpile/cache/region.py", line 977, in get_value
    value = self._get_from_backend(key)
  File "/app/medusa/ext/dogpile/cache/region.py", line 1264, in _get_from_backend
    return self._parse_serialized_from_backend(
  File "/app/medusa/ext/dogpile/cache/region.py", line 1221, in _parse_serialized_from_backend
    metadata = json.loads(bytes_metadata)
  File "/usr/lib/python3.9/json/__init__.py", line 341, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

medariox commented 2 years ago

Should be fixed with https://github.com/pymedusa/Medusa/pull/10887

dirkronsmans commented 1 year ago

INFO

Python Version: 3.8.12 (default, Nov 15 2021, 06:04:41) [GCC 8.5.0] Operating System: Linux-4.4.180+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.19 Commit: pymedusa/Medusa@f690170c2cbd9f2804c38a6047059cb1ace8afe3 Link to Log: https://gist.github.com/d4f3dc215fee51bc171ce757a35c70fd

ERROR

2022-10-11 15:55:18 ERROR    Thread_0 :: [f690170] Exception generated: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/server/web/core/base.py", line 252, in async_call
    result = function(**kwargs)
  File "/volume1/@appstore/medusa/src/medusa/server/web/home/handler.py", line 1015, in fetch_releasegroups
    groups = get_release_groups_for_anime(series_name)
  File "", line 2, in get_release_groups_for_anime
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1577, in get_or_create_for_user_func
    return self.get_or_create(
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1042, in get_or_create
    with Lock(
  File "/volume1/@appstore/medusa/src/ext/dogpile/lock.py", line 185, in __enter__
    return self._enter()
  File "/volume1/@appstore/medusa/src/ext/dogpile/lock.py", line 87, in _enter
    value = value_fn()
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 977, in get_value
    value = self._get_from_backend(key)
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1264, in _get_from_backend
    return self._parse_serialized_from_backend(
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1221, in _parse_serialized_from_backend
    metadata = json.loads(bytes_metadata)
  File "/usr/lib/python3.8/json/__init__.py", line 343, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

dirkronsmans commented 1 year ago

INFO

Python Version: 3.8.12 (default, Nov 15 2021, 06:04:41) [GCC 8.5.0] Operating System: Linux-4.4.180+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.19 Commit: pymedusa/Medusa@e4b480c924d0dbb01417333a5669b3cfcf19f9fe Link to Log: https://gist.github.com/9da5cafae2a1fcffa96cce930dc8a776

ERROR

2022-11-22 11:23:55 ERROR    Thread_0 :: [e4b480c] Exception generated: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/server/web/core/base.py", line 252, in async_call
    result = function(**kwargs)
  File "/volume1/@appstore/medusa/src/medusa/server/web/home/handler.py", line 1015, in fetch_releasegroups
    groups = get_release_groups_for_anime(series_name)
  File "", line 2, in get_release_groups_for_anime
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1577, in get_or_create_for_user_func
    return self.get_or_create(
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1042, in get_or_create
    with Lock(
  File "/volume1/@appstore/medusa/src/ext/dogpile/lock.py", line 185, in __enter__
    return self._enter()
  File "/volume1/@appstore/medusa/src/ext/dogpile/lock.py", line 87, in _enter
    value = value_fn()
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 977, in get_value
    value = self._get_from_backend(key)
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1264, in _get_from_backend
    return self._parse_serialized_from_backend(
  File "/volume1/@appstore/medusa/src/ext/dogpile/cache/region.py", line 1221, in _parse_serialized_from_backend
    metadata = json.loads(bytes_metadata)
  File "/usr/lib/python3.8/json/__init__.py", line 343, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators