screenpipe/screenpipe · error · anyhow::Error

path does not exist: {}

Error message

path does not exist: {}

What it means

The Logseq connection's connect/test step validates the user-supplied `graph_path` credential and bails if the filesystem path does not exist at all. This is raised in the test/connect entry point before checking that it is actually a Logseq graph.

Source

Thrown at crates/screenpipe-connect/src/connections/logseq.rs:43

pub struct Logseq;

#[async_trait]
impl Integration for Logseq {
    fn def(&self) -> &'static IntegrationDef {
        &DEF
    }

    async fn test(
        &self,
        _client: &reqwest::Client,
        creds: &Map<String, Value>,
        _secret_store: Option<&SecretStore>,
    ) -> Result<String> {
        let graph_path = require_str(creds, "graph_path")?;
        let p = std::path::Path::new(graph_path);
        if !p.exists() {
            anyhow::bail!("path does not exist: {}", graph_path);
        }
        if !p.join("logseq").exists() {
            anyhow::bail!("not a Logseq graph (missing logseq/ directory)");
        }
        Ok(format!("connected to graph at {}", graph_path))
    }
}

View on GitHub (pinned to 4ebf712990)

Solutions

  1. Check the path exists: ls <graph_path>; correct the graph_path credential value
  2. Expand ~ to an absolute path and use the folder that contains pages/, journals/, and logseq/
  3. Reconnect the Logseq connection with the updated path

Example fix

// before
{"graph_path": "~/MyGraph"}
// after
{"graph_path": "/Users/me/MyGraph"}
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs'); if (!fs.existsSync(graphPath)) throw new Error(`graph_path missing: ${graphPath}`);

Prevention

When it happens

Trigger: Configuring the Logseq connection with creds `{"graph_path": "/some/dir"}` where the directory was deleted, moved, or the string has a typo; relative path resolved from an unexpected working directory.

Common situations: User moved their Logseq graph to iCloud/Dropbox and the sync path changed; graph stored under a renamed home folder; path typed with ~ unexpanded by the integration.

Related errors


AI-assisted analysis of screenpipe/screenpipe@4ebf712990 (2026-09-01). Data as JSON: /api/errors/4f160c9467cadd15. Report an issue: GitHub.