You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Document类型对象引发调试器崩溃及FastAPI连接异常问题

问题描述:Google Document AI Document对象引发调试崩溃与FastAPI连接异常
  • 系统环境:Windows 11 Pro 23H2
  • VS Code版本:1.93.1
  • 使用工具:Google Document AI API

核心问题:
从Google Document AI API获取的Document类型对象一旦出现在变量中,VS Code的调试服务器就会直接崩溃,且调试控制台、终端均无任何日志输出。

复现代码及异常表现:
尝试通过以下代码记录Document对象时,出现类似异常:

import logging
from google.cloud.documentai import Document
with open(
    "./test_data/documents/redefine_meat/beef_patties/Premium_burger_ocr_document.pickle",
    "rb",
) as f:
    doc: Document = pickle.load(f)

logging.info(f"The document: {doc}")

运行该代码的FastAPI服务器会突然拒绝所有活跃连接,但进程并未实际崩溃,控制台也没有日志输出。不过直接在FastAPI中打印Document对象却无任何问题。

问题演示:
问题演示动图

内容的提问来源于stack exchange,提问作者user5134394

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 04:25:55