You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: missing or invalid 'info' section in torrent file
File "src\<relief>\core\components\libtorrent\torrentdef.py", line 64, in __init__
ValueError: missing or invalid 'info' section in torrent file
File "src\<relief>\core\components\restapi\rest\rest_manager.py", line 53, in error_middleware
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
File "src\<relief>\core\components\metadata_store\restapi\channels_endpoint.py", line 440, in add_torrent_to_channel
File "src\<relief>\core\components\libtorrent\torrentdef.py", line 117, in load_from_memory
File "src\<relief>\core\components\libtorrent\torrentdef.py", line 125, in load_from_dict
File "src\<relief>\core\components\libtorrent\torrentdef.py", line 66, in __init__
Here:
asyncdefadd_torrent_to_channel(self, request):
...
ifnotparameters.get('torrent', None):
returnRESTResponse({"error": "torrent parameter missing"}, status=HTTP_BAD_REQUEST)
# Try to parse the torrent data# Any errors will be handled by the error_middlewaretorrent=base64.b64decode(parameters['torrent'])
torrent_def=TorrentDef.load_from_memory(torrent) # <-- here
The erroneous torrent metadata was:
{
b'announce': "b'/announce?pid='"
}
It looks like the endpoint code should handle ValueError and return RESTResponse with an error description.
The text was updated successfully, but these errors were encountered:
Here:
The erroneous torrent metadata was:
It looks like the endpoint code should handle
ValueError
and returnRESTResponse
with an error description.The text was updated successfully, but these errors were encountered: