Files
msgbot/.gitignore
T
youpaishidifu 4ae189e82f 修复EasyOCR CUDA OOM冻结+时间戳day=0崩溃+OCR图片分目录img/raw+processed
- 冻结根因: CUDA OOM后worker不退出, 损坏context持续占显存, 父进程不杀子进程
  反复发图→线程堆积+显存耗尽→桌面冻结
- worker: readtext CUDA/kernel错误→立即退出释放显存(faulerhandler已有兜底)
- 父进程: 收到CUDA错误→立即杀子进程+30s冷却; 连续2次CUDA错误→EASYOCR_FORCE_CPU=1
  强制CPU模式启动(显存不足降级防冻结)
- 时间戳day=0崩溃: _is_timestamp_old跨午夜用replace(day-1), 每月1号day=1→day=0
  抛ValueError day is out of range for month→微信OCR整轮失败; 改用timedelta(days=±1)
- OCR调试图片回源码目录: img/raw(原图PNG) + img/processed(处理后JPG) 分目录存储
- 崩溃日志回源码根 easyocr_crash.log (不写%LOCALAPPDATA%)
- _clean_old_ocr_debug 默认 keep=20 (回退上一轮激进keep=6)
- .gitignore: 忽略 img/ 与 worker_stderr/stdout.txt
2026-08-01 22:23:55 +08:00

49 lines
529 B
Plaintext

# Python
__pycache__/
*.pyc
*.pyo
*.egg-info/
dist/
build/
# Virtual environment
venv/
.venv/
.venv311/
env/
# IDE
.vscode/
.idea/
# Config (keep template but ignore local)
config.json
local_config.json
# User data
知识库/
.knowledge_base/
# Debug dumps
.debug/
tim_dump.txt
# OCR debug screenshots
ocr_debug_*.png
wechat_ocr_*.png
# OCR 调试图片分目录(img/raw 原图 + img/processed 处理后)
img/
# Shell redirect artifacts
nul
worker_stderr.txt
worker_stdout.txt
# Logs
*.log
# OS
Thumbs.db
.DS_Store