idlesign / torrentool

The tool to work with torrent files.
https://github.com/idlesign/torrentool
BSD 3-Clause "New" or "Revised" License
148 stars 30 forks source link

Can't mix strings and bytes in path components [RUS] #15

Closed alex-devPY closed 3 years ago

alex-devPY commented 3 years ago

Здравствуйте. В некоторых торрентах возникает проблема с files.

    log.info('files: {}'.format(t.files))

  File "C:\Users\Alex\AppData\Local\Programs\Python\Python38\lib\site-packages\torrentool\torrent.py", line 96, in files
    files.append(TorrentFile(join(base, *f['path']), f['length']))
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 117, in join
    genericpath._check_arg_types('join', path, *paths)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python38\lib\genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
idlesign commented 3 years ago

Приветствую.

Такое поведение замечено на файлах, не следующих спецификации (см. #2). В 1.1.1 сделана попытка обхода для таких случаев. Пробовали эту версию?

alex-devPY commented 3 years ago

Извините, была установлена старая версия. В 1.1.1 все работает.