Skip to content

[BUG] create local path collection failed #688

@iziang

Description

@iziang

Describe the bug

[2025-04-09 11:48:41,009: ERROR/MainProcess] Task aperag.tasks.sync_documents_task.sync_documents[1c15a33f-1919-414a-84c1-c8b80ba8b9ec] raised unexpected: KeyError('path')
Traceback (most recent call last):
File "/Users/slc/Library/Caches/pypoetry/virtualenvs/aperag-P2aLB1H5-py3.11/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/Users/slc/Library/Caches/pypoetry/virtualenvs/aperag-P2aLB1H5-py3.11/lib/python3.11/site-packages/celery/app/trace.py", line 760, in protected_call
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/slc/code/ApeRAG/aperag/tasks/sync_documents_task.py", line 118, in sync_documents
if not os.path.exists(src_doc.metadata["path"]):
~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'path'

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions