jxxghp / MoviePilot

NAS媒体库自动化管理工具
https://wiki.movie-pilot.org
GNU General Public License v3.0
6.95k stars 836 forks source link

[错误报告]: V2容器启动后反复报错 #2914

Closed Kaystar closed 1 month ago

Kaystar commented 1 month ago

确认

当前程序版本

jxxghp/moviepilot-v2:latest

运行环境

Docker

问题类型

主程序运行问题

问题描述

容器启动后反复报错

发生问题时系统日志和配置文件

【DEBUG】2024-10-23 15:21:46,759 - event.py - Subscribed to broadcast event: site.updated - app.chain.site.SiteChain.cache_site_icon
【DEBUG】2024-10-23 15:21:46,833 - event.py - Subscribed to broadcast event: site.updated - app.chain.site.SiteChain.clear_site_data
【DEBUG】2024-10-23 15:21:46,908 - event.py - Subscribed to broadcast event: site.updated - app.chain.site.SiteChain.cache_site_userdata
【DEBUG】2024-10-23 15:21:47,096 - event.py - Subscribed to broadcast event: downloadfile.deleted - app.chain.download.DownloadChain.download_file_deleted
【DEBUG】2024-10-23 15:21:47,198 - event.py - Subscribed to broadcast event: metadata.scrape - app.chain.media.MediaChain.scrape_metadata_event
【DEBUG】2024-10-23 15:21:47,303 - event.py - Subscribed to broadcast event: site.deleted - app.chain.search.SearchChain.remove_site
【DEBUG】2024-10-23 15:21:47,410 - event.py - Subscribed to broadcast event: site.deleted - app.chain.subscribe.SubscribeChain.remove_site
【INFO】2024-10-23 15:21:48,656 - module.py - Moudle Loaded:BangumiModule
【INFO】2024-10-23 15:21:48,778 - module.py - Moudle Loaded:DoubanModule
【ERROR】2024-10-23 15:21:48,929 - module.py - Load Moudle Error:EmbyModule,(sqlite3.OperationalError) no such table: systemconfig
[SQL: SELECT systemconfig.id AS systemconfig_id, systemconfig."key" AS systemconfig_key, systemconfig.value AS systemconfig_value 
FROM systemconfig]
(Background on this error at: https://sqlalche.me/e/20/e3q8) - Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: systemconfig

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/app/core/module.py", line 46, in load_modules
    _module.init_module()
  File "/app/app/modules/emby/__init__.py", line 18, in init_module
    super().init_service(service_name=Emby.__name__.lower(),
  File "/app/app/modules/__init__.py", line 99, in init_service
    configs = self.get_configs()
              ^^^^^^^^^^^^^^^^^^
  File "/app/app/modules/__init__.py", line 256, in get_configs
    configs = ServiceConfigHelper.get_mediaserver_configs()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/helper/service.py", line 43, in get_mediaserver_configs
    return ServiceConfigHelper.get_configs(SystemConfigKey.MediaServers, MediaServerConf)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/helper/service.py", line 25, in get_configs
    config_data = SystemConfigOper().get(config_key)
                  ^^^^^^^^^^^^^^^^^^
  File "/app/app/utils/singleton.py", line 14, in __call__
    cls._instances[key] = super().__call__(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/db/systemconfig_oper.py", line 18, in __init__
    for item in SystemConfig.list(self._db):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/db/__init__.py", line 148, in wrapper
    raise err
  File "/app/app/db/__init__.py", line 146, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/db/__init__.py", line 193, in list
    result = db.query(cls).all()
             ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2673, in all
    return self._iter().all()  # type: ignore
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter
    result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
                                                  ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
    return self._execute_internal(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2247, in _execute_internal
    result: Result[Any] = compile_state_cls.orm_execute_statement(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 305, in orm_execute_statement
    result = conn.execute(
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1418, in execute
    return meth(
           ^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
    return self._exec_single_context(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: systemconfig
[SQL: SELECT systemconfig.id AS systemconfig_id, systemconfig."key" AS systemconfig_key, systemconfig.value AS systemconfig_value 
FROM systemconfig]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: systemconfig
lsc272 commented 1 month ago

同样报错,系统fnos

LongShengWen commented 1 month ago

同报错,系统Linux pve x86_64

yellowstrong commented 1 month ago

同问题,系统unraid

mjsoftking commented 1 month ago

是不是由1使用相同配置升级的,好像不支持升级安转

LongShengWen commented 1 month ago

是不是由1使用相同配置升级的,好像不支持升级安转

新起的容器和目录

mjsoftking commented 1 month ago

是不是由1使用相同配置升级的,好像不支持升级安转

新起的容器和目录

昨天晚上用1的配置弄了一下,类似的错误sql的一些报错,然后删除所有的文件,重启启动了几次才好的

tanmx commented 1 month ago

更新镜像即可