Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torrentinfo_endpoint.get_torrent_info bdecode RuntimeError #8360

Open
absolutep opened this issue Dec 27, 2024 · 1 comment
Open

torrentinfo_endpoint.get_torrent_info bdecode RuntimeError #8360

absolutep opened this issue Dec 27, 2024 · 1 comment
Milestone

Comments

@absolutep
Copy link

Hi! I was using Tribler and THIS happened! 😢

Traceback (most recent call last):
  File "D:\a\tribler\tribler\src\tribler\core\restapi\rest_manager.py", line 110, in error_middleware
  File "D:\a\tribler\tribler\src\tribler\core\restapi\rest_manager.py", line 164, in required_components_middleware
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
  File "D:\a\tribler\tribler\src\tribler\core\libtorrent\restapi\torrentinfo_endpoint.py", line 201, in get_torrent_info
RuntimeError: expected value (list, dict, int or string) in bencoded string [bdecode:4]

@qstokkink qstokkink changed the title Hi! I was using Tribler and THIS happened torrentinfo_endpoint.get_torrent_info bdecode RuntimeError Jan 6, 2025
@qstokkink
Copy link
Contributor

Thanks for reporting! I can reproduce this. It seems that we don't handle bad URLs when retrieving torrent files.

Reproduction steps:

  1. Click + Add torrent
  2. Click Import torrent from magnet/URL
  3. Enter https://github.com/Tribler/tribler/

[dev stuff]

The following line should have error handling, like the rest of the REST API method:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants