qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.64k stars 3.91k forks source link

Invalid torrent - I get: Failed to load torrent:... Error: expected value (list, dict, int or string) in bencoded string #10696

Closed colibris79 closed 2 years ago

colibris79 commented 5 years ago

Please provide the following information

qBittorrent version and Operating System

qBittorrent 4.1.6.99 (64bit) from repos, Linux Mint 18.3 (Ubuntu 16.04)

If on linux, libtorrent and Qt version

libtorrent 1.1.13, Qt5 5.5.1 and Qt4 4.8.7

What is the problem

After last update when opening .torrent files I get the following message: Invalid torrent - Failed to load torrent:... Error: expected value (list, dict, int or string) in bencoded string Magnet links are working fine

What is the expected behavior

It is supposed to add the torrent to the download list

Steps to reproduce

Download a .torrent file and open it with qBittorrent

Extra info(if any)

Similar problem as in #7818 and #8450

fireattack commented 5 years ago

I have the same issue with a private tracker.

The RSS looks normal, and does have proper <link> node.

corey33p commented 4 years ago

I have the same problem. Somebody help.

Calm-Mango commented 4 years ago

I have the same issue. Help plz.

Dannymx commented 4 years ago

Torrent file is corrupted or qBittorrent doesn't know how to backup the torrent files. I tried to restore some old torrents and I got this message as well.

FranciscoPombal commented 4 years ago

The problem with https://github.com/qbittorrent/qBittorrent/issues/7818 was that the RSS feeds in question did not contain a direct link to a torrent file (just some webpage that then linked to a torrent file), or has an otherwise incompatible format. It was not a problem with qBittorrent.

This is most likely the same problem here. However, nothing can be done unless someone posts an example feed where this happens (if this is from a private tracker you'll need to redact any passkey related info and stuff like that). Then we can determine whether this is a problem with qBittorrent or if the feed does not have the required format.

IShmelov commented 2 years ago

Hey @FranciscoPombal, here is the feed providing direct links to torrent files: https://www.pipes.digital/feed/GqK4QQ9x? but even with this one I have "Couldn't load torrent: expected value (list, dict, int or string) in bencoded string". Could you take a look?

Also, I have a docker container providing RSS feed with direct download links - when I push "Open news URL" the browser downloads the .torrent file. Let me know if it could be helpful.

IShmelov commented 2 years ago

Hey @glassez , I've seen your responses on similar topics about this behavior. Could you take a look, please?

I'm still getting this error, but can't find any mention in logs of the exact corrupted field. I've tweaked my dockerized RSS generator to have the same set of fields as https://www.limetorrents.pro/rss/ , which is working, but still no luck.

According to .json files created from both feeds, mine is missing 2 fields - comment and size. Can it be the reason?

UPD: I suspect, I've found the reason - torrent URL requires authorization

glassez commented 2 years ago

Hey @glassez , I've seen your responses on similar topics about this behavior. Could you take a look, please?

Error "expected value (list, dict, int or string) in bencoded string" is about decoding torrent file. So if "torrent URL requires authorization" it most likely send some error message to unauthorized request that cannot be parsed as torrent file.

IShmelov commented 2 years ago

it most likely send some error message to unauthorized request that cannot be parsed as torrent file.

You are right, in other topics I've found a combination of RSS and cookie-related issues and realized that, as usual, the problem is somewhere between the keyboard and a chair. I've supplied qbt with the cookie from my browser (been using qbt for a long, but haven't spotted a cookie manager before) and it finally works. thanks for helping!

ghost commented 2 years ago

Closing this as this does not seem like a issue. Most likely the user didn't supply cookies to qBt for links that require user auth.

rbasa349 commented 11 months ago

it's problem in qbitorrent web-UI (all works in app), pls fix, thank you!

luzpaz commented 11 months ago

@rbasa349 Full version please (with dependencies)

julian-alarcon commented 10 months ago

I have this issue now with qBittorrent UI. The tracker page needs nothing, when I tried this from the normal QT client it works without any issue.

2023-11-23 19:07:06.184235+01:00(N) 2023-11-23T19:07:06 - Downloading torrent, please wait... Source: "https://www....-11873925.html"
2023-11-23 19:07:06.553539+01:00(W) 2023-11-23T19:07:06 - Failed to load torrent. Reason: "expected value (list, dict, int or string) in bencoded string"
Tontze commented 10 months ago

Same issue here, using qbittorrents own search engine and found torrents give this same error :|

uguremirmustafa commented 8 months ago

I am running qBittorrent v5.0.0alpha1 on Ubuntu Server 22 and this issue is still there on web UI