Skip to content
This repository was archived by the owner on May 29, 2022. It is now read-only.
This repository was archived by the owner on May 29, 2022. It is now read-only.

zero bytes torrent file will throw an error #49

@mekarawr

Description

@mekarawr

`Traceback (most recent call last):
File "autotorrent-env/bin/autotorrent", line 8, in
sys.exit(commandline_handler())
File "/root/autotorrent-env/lib/python3.8/site-packages/autotorrent/cmd.py", line 210, in commandline_handler
result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run)
File "/root/autotorrent-env/lib/python3.8/site-packages/autotorrent/at.py", line 500, in handle_torrentfile
torrent = self.open_torrentfile(path)
File "/root/autotorrent-env/lib/python3.8/site-packages/autotorrent/at.py", line 568, in open_torrentfile
return bdecode(f.read())
File "/root/autotorrent-env/lib/python3.8/site-packages/autotorrent/bencode.py", line 62, in bdecode
r, l = decode_func[six.indexbytes(x, 0)](x, 0)
IndexError: index out of range

due to an empty (zero bytes) torrent file

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