auto: sync OpenClaw config 2026-09-16 16:13
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# 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**: 采用方案 1(PYTHONPATH),周报随即成功归档并同步 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
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user