Re: [BUG] "Error: Cannot open database…" when loading config

Subject: Re: [BUG] "Error: Cannot open database…" when loading config

Date: Sun, 03 Dec 2023 09:34:50 -0400

To: Alyssa Ross,


From: David Bremner

Alyssa Ross <> writes:

> Since commit 1c10d91d ("Pass error message from GLib ini parser to CLI"),
> when I run "notmuch config list", I get this error message at the start
> of the output:
> 	Error: Cannot open database at /home/qyliss/state/notmuch/default: No such file or directory.
> Presumably this is because my database is in a non-default location,
> which it doesn't know until it's loaded the config.

I suspect something is being reported as an error when it really isn't
(the library tries a sequence of things when starting up).

If you can tell me a bit more about your setup, I can try and duplicate
the bug. For starters, where is your config file located, and where is
your database?

You could also try the following patch, which is a bit of a wild guess

diff --git a/notmuch.c b/notmuch.c
index 814b9e42..7e396d43 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -563,7 +563,7 @@ main (int argc, char *argv[])
-       if (status_string) {
+       if (status && status_string) {
            fputs (status_string, stderr);
            free (status_string);
            status_string = NULL;
notmuch mailing list --
To unsubscribe send an email to