EstrellaXD / Auto_Bangumi

AutoBangumi - 全自动追番工具
https://autobangumi.org
MIT License
6.89k stars 357 forks source link

[错误报告]添加番剧失败,提示服务器错误并且回到登录界面 #832

Open chenxuxin188 opened 2 months ago

chenxuxin188 commented 2 months ago

确认

当前程序版本

latest

问题类型

WebUI

问题描述

https://[mikanani.me/RSS/Bangumi?bangumiId=3355&subgroupid=370](https://mikanani.me/RSS/Bangumi?bangumiId=3355&subgroupid=370) 收集该番剧,提示服务器错误并返回登录界面。qbittorrent里第七集没有下载。

发生问题时系统日志

[2024-08-24 21:47:23] INFO:     Start collecting 异世界自杀小队​​ Season 1...
[2024-08-24 21:47:24] ERROR     Exception in ASGI application
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/uvicorn/middleware/message_logger.py", line 86, in __call__
    raise exc from None
  File "/usr/lib/python3.11/site-packages/uvicorn/middleware/message_logger.py", line 82, in __call__
    await self.app(scope, inner_receive, inner_send)
  File "/usr/lib/python3.11/site-packages/fastapi/applications.py", line 282, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/fastapi/routing.py", line 241, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/fastapi/routing.py", line 167, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/module/api/rss.py", line 190, in download_collection
    resp = collector.collect_season(data, data.rss_link)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/module/manager/collector.py", line 21, in collect_season
    if self.add_torrent(torrents, bangumi):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/module/downloader/download_client.py", line 138, in add_torrent
    if self.client.add_torrents(
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/module/downloader/client/qb_downloader.py", line 86, in add_torrents
    resp = self._client.torrents_add(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/decorators.py", line 91, in wrapper
    return func(client, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/torrents.py", line 1306, in torrents_add
    return self._post(
           ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/request.py", line 390, in _post
    return self._request_manager(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/request.py", line 465, in _request_manager
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/request.py", line 542, in _request
    self._handle_error_responses(data, params, response)
  File "/usr/lib/python3.11/site-packages/qbittorrentapi/request.py", line 786, in _handle_error_responses
    raise UnsupportedMediaType415Error(response.text)
qbittorrentapi.exceptions.UnsupportedMediaType415Error: Error: 'torrent__3' is not a valid torrent file.
chenxuxin188 commented 2 months ago

似乎是qbittorrent的问题。。我再看看

chenxuxin188 commented 2 months ago

应该是autobangumi给的种子文件有问题。可否处理一下报错?出现这个错误之后 后续的RSS更新都不会再执行了。

laurencedu commented 1 month ago

同样的问题 ERROR [2024-09-30 14:52:32] ERROR Exception in ASGI application Traceback (most recent call last) File "/usr/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi result = await app( # type ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/uvicorn/middleware/message_logger.py", line 86, in call raise exc from None File "/usr/lib/python3.11/site-packages/uvicorn/middleware/message_logger.py", line 82, in call await self.app(scope, inner_receive, inner_send) File "/usr/lib/python3.11/site-packages/fastapi/applications.py", line 282, in call await super().call(scope, receive, send) File "/usr/lib/python3.11/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/usr/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/usr/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/usr/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/usr/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/usr/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call raise e File "/usr/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call await self.app(scope, receive, send) File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/usr/lib/python3.11/site-packages/starlette/routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/fastapi/routing.py", line 241, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/fastapi/routing.py", line 167, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/module/api/rss.py", line 178, in analysis data = analyser.link_to_data(rss) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/module/rss/analyser.py", line 84, in link_to_data torrents = self.get_rss_torrents(rss.url, False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/module/rss/analyser.py", line 42, in get_rss_torrents rss_torrents = req.get_torrents(rss_link, "\d+-\d+") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/module/network/request_contents.py", line 22, in get_torrents soup = self.get_xml(_url, retry) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/module/network/request_contents.py", line 44, in get_xml return xml.etree.ElementTree.fromstring(req.text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1345, in XML parser.feed(text) xml.etree.ElementTree.ParseError mismatched tag: line 52, column 2