JohnDoee / autotorrent

Matches torrents with files and gets them seeded
MIT License
269 stars 34 forks source link

zero bytes torrent file will throw an error #49

Open mekarawr opened 3 years ago

mekarawr commented 3 years ago

`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