Files
openclaw-config/workspace-resume/.learnings/ERRORS.md
T

49 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Errors
Command failures and integration errors.
---
## [ERR-20260916-001] python3-run-tmp-script
**Logged**: 2026-09-16T08:10:00+08:00 (观测于 2026-08-28,回溯补录)
**Priority**: medium
**Status**: resolved
**Area**: backend
### Summary
`/tmp` 运行周报生成脚本时,无法导入同目录的 `send_weekly_report.py`,脚本直接崩溃,周报未生成。
### Error
```
Traceback (most recent call last):
File "/tmp/gen_g6_report.py", line 1, in <module>
from send_weekly_report import send_to_drafts
ModuleNotFoundError: No module named 'send_weekly_report'
```
### Context
- Command/operation attempted: `python3 /tmp/gen_g6_report.py`(脚本首行 `from send_weekly_report import send_to_drafts`
- Input or parameters used: 临时脚本放在 `/tmp`,模块 `send_weekly_report.py``/home/yangxuan/.openclaw/workspace-resume/`
- Environment details: cwd 已是 workspace-resume,但 Python 只把**脚本所在目录**`/tmp`)加入 `sys.path`cwd 不在其中
- Summary of relevant output: 退出码 1,无其他副作用(未写草稿、未归档、未入库)
### Suggested Fix
两条任选其一:
1. 运行前显式指定模块搜索路径:`PYTHONPATH=/home/yangxuan/.openclaw/workspace-resume python3 /tmp/gen_g6_report.py`
2. 直接把临时生成脚本写在 workspace 目录内再运行(`python3 gen_report.py`
### Resolution
- **Resolved**: 2026-08-28T05:34:00Z
- **Notes**: 采用方案 1PYTHONPATH),周报随即成功归档并同步 MySQL。
### Metadata
- Reproducible: yes
- Related Files: send_weekly_report.py
- Pattern-Key: deps.module-not-found
- Recurrence-Count: 1
- First-Seen: 2026-08-28
- Last-Seen: 2026-08-28
---