OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Question]: "directory already exists" error persists even after deleting local data

Open datougua opened this issue 9 months ago • 3 comments

Your Question

Description

When adding resources to OpenViking, I keep getting this error: "Finalize from temp error: directory already exists: /resources/MEMORY"

What I tried

  1. Deleted local viking data directory
  2. Created new data directory
  3. Used client.reset()
  4. Reinstalled openviking package

The error persists. It seems like VikingDB cloud has cached this error state.

Expected behavior

Should be able to add new resources after resetting local data.

Environment

  • openviking version: 0.1.12
  • Python: 3.9
  • OS: macOS

Additional context

This happens even with a completely fresh data directory. The error suggests VikingDB cloud has some cached state that needs to be cleared.

Context

No response

Code Example (Optional)


Related Area

None

Before Asking

datougua avatar Feb 21 '26 04:02 datougua

What's VikingDB cloud you are using? usually, openviking is totally local. and starting in different dirs creates new data folders.

ZaynJarvis avatar Feb 22 '26 12:02 ZaynJarvis

VikingDB cloud will be supported in later version (over v0.1.18) use guide https://github.com/volcengine/OpenViking/blob/main/docs/en/guides/01-configuration.md

{
  "storage": {
    "vectordb": {
      "name": "context",
      "backend": "volcengine",
      "project": "default",
      "volcengine": {
        "region": "cn-beijing",
        "ak": "your-access-key",
        "sk": "your-secret-key"
      }
  }
}

baojun-zhang avatar Feb 28 '26 03:02 baojun-zhang

This issue has been fixed on the main branch. The mkdir operation now supports exist_ok semantics, so it will no longer throw "directory already exists" errors when the /resources/MEMORY directory already exists.

Additionally, a _resolve_unique_uri() mechanism was added to automatically handle name conflicts by appending _1, _2, etc.

Please upgrade to the latest version to resolve this:

pip install --upgrade openviking

qin-ctx avatar Mar 05 '26 11:03 qin-ctx