了解 Mailman3 日志中的 Python 堆栈跟踪

understanding python stacktrace in mailman3 log

提问人:greyjedi 提问时间:11/10/2023 更新时间:11/10/2023 访问量:16

问:

我刚刚升级了一个postorius/mailman3实例。 现在 webfrontend 显示,mailman3 日志包含以下消息:HTTP Error 500: {"title": "500 Internal Server Error"}

  File "falcon/app.py", line 365, in falcon.app.App.__call__
  File "/usr/lib/python3/dist-packages/mailman/rest/lists.py", line 341, in on_get
    resource = self._make_collection(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 171, in _make_collection
    start, total_size, collection = self._paginate(
                                    ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 167, in _paginate
    return list_start, total_size, collection[list_start:list_end]
                                   ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mailman/utilities/queries.py", line 63, in __getitem__
    .all()
     ^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 1476, in all
    return self._allrows()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 401, in _allrows
    rows = self._fetchall_impl()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 1389, in _fetchall_impl
    return self._real_result._fetchall_impl()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 1813, in _fetchall_impl
    return list(self.iterator)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/orm/loading.py", line 147, in chunks
    fetch = cursor._raw_all_rows()
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 393, in _raw_all_rows
    return [make_row(row) for row in rows]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/result.py", line 393, in <listcomp>
    return [make_row(row) for row in rows]
            ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sqlalchemy/sql/sqltypes.py", line 1870, in process
    return loads(value)
           ^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, '\xc2'.

这是什么意思?正在使用的版本是 Debian bookworm 存储库中的最新软件包。我从哪里开始搜索?此 Stacktrace 中发生了什么?

我通常会在服务器故障上问这样的事情,但似乎这个错误需要一些关于正在使用的框架和库的知识。

python-3.x sqlalchemy 泡菜 邮递员

评论

0赞 snakecharmerb 11/15/2023
错误来自 Python 的 pickle 模块。SQLAlchemy 有一个 PickleType,可用于存储序列化的 Python 对象。加载键错误通常表示某种损坏,

答: 暂无答案