Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Windows bug #3

@DiMartinoXBMC

Description

@DiMartinoXBMC

Пришел человек с ошибкой:
16:22:39 T:4772 NOTICE: Starting Kodi (15.2 Git:20151019-02e7013). Platform: Windows NT x86 32-bit

File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\plugin.video.torrenter\Anteoloader.py", line 162, in getContentList
files = self.engine.list()
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\engine.py", line 384, in list
for index, f in enumerate(files)]
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\engine.py", line 359, in _detect_media_type
mime_type = mimetypes.guess_type(name)[0]
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\mimetypes.py", line 294, in guess_type
init()
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\mimetypes.py", line 355, in init
db.read_windows_registry()
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\mimetypes.py", line 259, in read_windows_registry
for ctype in enum_types(mimedb):
File "C:\Users\Lakkoy\AppData\Roaming\Kodi\addons\script.module.torrent2http\lib\torrent2http\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
-->End of Python script error report<--

В интернете обнаружил:
ctype = ctype.encode(default_encoding) # omit in 3.x!
Author 7.6.12 Нет комментариев
Старый добрый баг Windows.

Решается переименованием кириллических названий в реестре в ветке HKEY_CLASSES_ROOT\MIME\Database\Content Type

Можно ли как-то просто не вызывать данную функцию или сделать её опциональной?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions