Closed xoriole closed 4 years ago
Libtorrent versions >1.2.0 produce this error instead of None
when encountering incorrect input, namely raw bytes and incorrect syntax. We use updated bindings on our machines, therefore we get this error. However, this could probably be because of alert.pkt_buf
changed its type.
Of course, we could just wrap the thing in a normal try-except
block, but we still have to be sure that we can parse correct cases. Otherwise, by applying try-except
we would introduce a piece of code that never does anything, and we can't check it.
@devos50 , you developed the BEP33 thing. Could you please fix it for Python 3.7 and ensure that the thing works after the fix (i.e. that BEP33 querying works)?
@xoriole , we discussed this yesterday, could you please solve it by doing our own wrapper for bdecode
that works the same (old) way in all versions of libtorrent?
platform Darwin-18.7.0-x86_64-i386-64bit machine x86_64 python.version 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
https://github.com/Tribler/tribler/blob/21fd6cae6866bf5c364479f2d83185e31fc8200c/Tribler/Core/Libtorrent/LibtorrentMgr.py#L577-L583