iw4p / torrentp

Python torrent downloader - Download from torrent with .torrent file or magnet link, with just 3 lines of python code.
Other
141 stars 28 forks source link

I cannot download using the magnet link #14

Closed aryannxroot closed 2 months ago

aryannxroot commented 3 months ago

Whenever I try to download using the magnet link the interpreter shows this error : Enable tracemalloc to get the object allocation traceback

Please help me here!!!!!!!!!!!!! Screenshot 2024-03-13 014729

iw4p commented 3 months ago

Hi, can you please install previous versions? Previous ones does not have async await. Older versions: https://pypi.org/project/torrentp/0.1.6/

Install it like: pip install torrentp==0.1.6

Sent from Proton Mail for iOS

On Tue, Mar 12, 2024 at 11:49 PM, Aryan @.***(mailto:On Tue, Mar 12, 2024 at 11:49 PM, Aryan < wrote:

Whenever I try to download using the magnet link the interpreter shows this error : Enable tracemalloc to get the object allocation traceback

Please help me here!!!!!!!!!!!!! Screenshot.2024-03-13.014729.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ufoptg commented 2 months ago

Whenever I try to download using the magnet link the interpreter shows this error : Enable tracemalloc to get the object allocation traceback

Please help me here!!!!!!!!!!!!! Screenshot 2024-03-13 014729

its because you are not awaiting the downloader

you have defined an async function called "downloadtorrent"

then on the second last line your not awaiting it..

so above print("Completed") you need to change it from _downloadtorrent(torrentfile) TO _await downloadtorrent(torrentfile)

ufoptg commented 2 months ago

any time you define a function async you must await it or use it asynchronously