unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Alyssa Ross <hi@alyssa.is>, notmuch@notmuchmail.org
Subject: Re: [BUG] "Error: Cannot open database…" when loading config
Date: Sun, 03 Dec 2023 09:34:50 -0400	[thread overview]
Message-ID: <87r0k3jtol.fsf@tethera.net> (raw)
In-Reply-To: <rby4lt56qdhbuvwct4xudr5jdd7ojwd6ymnghr4c3bem62sv2m@m3fsiz62hz4f>

Alyssa Ross <hi@alyssa.is> 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[])
                                               NULL,
                                               &notmuch,
                                               &status_string);
-       if (status_string) {
+       if (status && status_string) {
            fputs (status_string, stderr);
            free (status_string);
            status_string = NULL;

  reply	other threads:[~2023-12-03 13:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 11:07 [BUG] "Error: Cannot open database…" when loading config Alyssa Ross
2023-12-03 13:34 ` David Bremner [this message]
2023-12-03 15:03   ` Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0k3jtol.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=hi@alyssa.is \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).