OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Question]: CodeParser unimplemented, causing "Parse error"

Open Yang2096 opened this issue 9 months ago • 2 comments

Your Question

尝试添加 .go 文件到 OpenViking 中,结果报错:

INFO - ============================================================
INFO - [openviking_add_resource] Adding resource to OpenViking
INFO - ============================================================
INFO -   - path: 'D:\\document\\code\\xxxx\\app\\main.go'
INFO -   - target: ''
INFO -   - reason: 'main application entry point'
INFO -   - instruction: ''
INFO -   - wait: True
INFO -   - timeout: 300.0
INFO -   - Resource type: File
DEBUG -   - File size: 1,072 bytes (1.05 KB)
DEBUG -   - File extension: .go
INFO - Calling OpenViking SDK: add_resource()...
INFO - OpenViking SDK response received:
INFO - ============================================================
DEBUG -   - Raw SDK result type: dict
DEBUG -   - Raw SDK result keys: ['status', 'errors', 'source_path', 'queue_status']
INFO -   - status: error
DEBUG -   - errors: ["Parse error: 'NoneType' object has no attribute 'source_path'"]
DEBUG -   - source_path: None
DEBUG -   - queue_status: {'Embedding': {'processed': 15, 'error_count': 0, 'errors': []}, 'Semantic': {'processed': 1, 'error_count': 0, 'errors': []}}

看了一下现在代码里的 openviking\parse\parsers\code.py 确实没有实现,但是 registry.py 有注册CodeParser。不知道是不是这个原因导致的。

Context

No response

Code Example (Optional)


Related Area

None

Before Asking

Yang2096 avatar Feb 04 '26 15:02 Yang2096

代码解析我们正在设计集成,相关讨论在 https://github.com/volcengine/OpenViking/discussions/36

qin-ctx avatar Feb 05 '26 03:02 qin-ctx

I'm creating a new CodeRepositoryParser to support whole-repo-upload

MaojiaSheng avatar Feb 05 '26 05:02 MaojiaSheng