Skip to content

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

@Yang2096

Description

@Yang2096

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions