Skip to content

[BUG] Ignoring encoding error 'utf-8' codec can't decode byte 0xd4 in position 38: invalid continuation byte when playing file with russian file name #283

@soredake

Description

@soredake

Describe the bug

A clear and concise description of what the bug/error is.

Desktop (please complete the following information):

  • OS and Version: Windows 11 Pro
  • Python Version: Python 3.12.2
  • Player and Version: MPV.net 7.1.1.0

To Reproduce

Steps to reproduce the behavior:

  1. Open file with russian language in file name (like Физрук - S01E01 - Episode 1.mkv)
  2. Got to the trakt-scrobbler log.
  3. Ignoring encoding error 'utf-8' codec can't decode byte 0xd4 in position 38: invalid continuation byte

Log file

Click to see log contents

2024-03-19 12:30:16,955 - DEBUG - mpv - file_info - Raw filepath 'C:\\Users\\user\\shared-unruhe\\non-anime\\������\\Season 1\\������ - S01E01 - Episode 1.mkv'
2024-03-19 12:30:16,956 - DEBUG - mpv - utils - System encoding scheme: 'cp1251'
2024-03-19 12:30:16,956 - DEBUG - mpv - utils - UTF8: b'C:\\Users\\user\\shared-unruhe\\non-anime\\\xd0\xa4\xd0\xb8\xd0\xb7\xd1\x80\xd1\x83\xd0\xba\\Season 1\\\xd0\xa4\xd0\xb8\xd0\xb7\xd1\x80\xd1\x83\xd0\xba - S01E01 - Episode 1.mkv'
2024-03-19 12:30:16,956 - DEBUG - mpv - utils - System: b'C:\\Users\\user\\shared-unruhe\\non-anime\\\xd4\xe8\xe7\xf0\xf3\xea\\Season 1\\\xd4\xe8\xe7\xf0\xf3\xea - S01E01 - Episode 1.mkv'
2024-03-19 12:30:16,957 - WARNING - mpv - utils - Ignoring encoding error 'utf-8' codec can't decode byte 0xd4 in position 38: invalid continuation byte
2024-03-19 12:30:16,957 - DEBUG - mpv - file_info - Matched whitelist entry 'C:\\Users\\user\\shared-unruhe\\non-anime'
2024-03-19 12:30:17,171 - DEBUG - mpv - file_info - Guess: MatchesDict({'title': '������', 'season': 1, 'episode': 1, 'episode_title': 'Episode 1', 'container': 'mkv', 'mimetype': 'video/x-matroska', 'type': 'episode'})
2024-03-19 12:30:17,171 - DEBUG - mpv - monitor - action=scrobble
2024-03-19 12:30:17,172 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.02, 'media_info': {'type': 'episode', 'title': '������', 'season': 1, 'episode': 1}, 'updated_at': 1710844217.1718879}
2024-03-19 12:30:17,172 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.02% for ������
2024-03-19 12:30:18,063 - INFO - scrobbler - scrobbler - Scrobble start successful for P. E. Teacher S01E01 at 0.02%
2024-03-19 12:30:25,598 - DEBUG - mpv - monitor - action=scrobble
2024-03-19 12:30:25,599 - DEBUG - mpv - monitor - {'state': 0, 'progress': 0.58, 'media_info': {'type': 'episode', 'title': '������', 'season': 1, 'episode': 1}, 'updated_at': 1710844225.598191}
2024-03-19 12:30:25,599 - DEBUG - mpv - mpv - Pipe closed.
2024-03-19 12:30:25,599 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 0.58% for ������
2024-03-19 12:30:25,700 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2024-03-19 12:30:25,780 - INFO - scrobbler - scrobbler - Scrobble pause successful for P. E. Teacher S01E01 at 0.58%

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions