2025-12-02 18:54:14 +08:00

31 lines
1.1 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.

## 1. 修复视频路径格式
- [x] 检查 DashScope SDK 文档和示例代码,确认正确的路径格式
- [x] 修改 `analyze_video` 方法,先尝试直接使用绝对路径字符串
- [x] 如果直接路径失败,回退到 `file://` 格式
- [x] 添加详细的日志记录用于调试
- [x] 修改 `compare_videos` 方法,使用相同的逻辑(先尝试直接路径,失败后回退到 file:// 格式)
## 2. 验证
- [ ] 测试视频分析功能
- [ ] 验证路径格式正确
- [ ] 确认 API 调用成功
## 根因分析
根据错误日志和 DashScope 文档:
1. **当前使用的格式**`file:///Users/d-robotics/workSpace/videoSummary/uploads/...`
2. **错误信息**`The provided URL does not appear to be valid`
3. **可能的原因**
- DashScope Python SDK 可能期望直接接收绝对路径字符串,而不是 `file://` URL
- SDK 内部可能会自动处理路径转换
- 或者 `file://` 格式需要不同的编码方式
**解决方案**
- 首先尝试直接使用绝对路径字符串(让 SDK 处理)
- 如果失败,回退到 `file://` 格式
- 添加详细日志以便调试