Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error message when notmuch setup is not completed #23

Open
The-Compiler opened this issue May 25, 2023 · 0 comments
Open

Confusing error message when notmuch setup is not completed #23

The-Compiler opened this issue May 25, 2023 · 0 comments

Comments

@The-Compiler
Copy link
Contributor

I tried to run dodo without having notmuch set up properly yet:

$ notmuch search
Error: cannot load config file.

doing so results in a rather confusing error:

$ dodo
Error: cannot load config file.
Error: cannot load config file.
Traceback (most recent call last):
  File "/home/florian/tmp/dodo/.venv/bin/dodo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/florian/tmp/dodo/dodo/app.py", line 291, in main
    dodo = Dodo()
           ^^^^^^
  File "/home/florian/tmp/dodo/dodo/app.py", line 107, in __init__
    self.open_search(query, keep_open=True)
  File "/home/florian/tmp/dodo/dodo/app.py", line 179, in open_search
    p = search.SearchPanel(self, query, keep_open=keep_open)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/florian/tmp/dodo/dodo/search.py", line 170, in __init__
    self.model = SearchModel(q)
                 ^^^^^^^^^^^^^^
  File "/home/florian/tmp/dodo/dodo/search.py", line 42, in __init__
    self.refresh()
  File "/home/florian/tmp/dodo/dodo/search.py", line 50, in refresh
    self.d = json.loads(self.json_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant