jrnl
jrnl copied to clipboard
EOFError during first run of jrnl
Diagnostic output
jrnl: v4.0.1 Python: 3.11.4 (main, Jun 7 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)] OS: Linux 6.4.6-200.fc38.x86_64
Current Behavior
When installing jrnl, it returned an "EOFError" about "reading a line" and claimed it "is probably a bug," asking me to "file an issue."
Expected Behavior
Not that.
Repro Steps
Install jrnl.
Debug output
Nothing of note, since the error occurred during install.
Other Information
Fedora 38
Hi @moore-bryan, thanks for filing this bug. If you don't mind answering a few questions to help us narrow things down:
Did you install jrnl from the Fedora package, or use a different method like pipx or brew?
Can you reproduce the error by running jrnl again? And if not, could you delete your config file listed when you run jrnl --list
(though make a backup first if you've started using jrnl) and run jrnl --debug
to see if it happens again? If it does, sharing that debug output could help us significantly narrow down the issue.
Sure...
I initially just ran jrnl
from the cli to see if it was already installed and responded "Y" when zsh
informed me it wasn't and asked if I wanted to install it.
I can confirm installing via dnf
results in no such errors, so I would think it's related to the method by which zsh
installs things and that is way above my pay grade. :-)
Thanks. I'm not sure exactly why this would happen, though the closest I can get to reproducing the error on my machine is to use the EOF terminator (Ctrl+Z on Windows, Ctrl+D on Linux) on the prompt for the journal path when jrnl first runs.
At the very least, I think we should be able to catch this EOFError there and print a more useful error message, though if anyone else runs into this problem, please let us know here.
A solution to this issue should:
- [ ] Catch EOFError during the install process and treat it as the end of input for the install prompts. If there's no string data returned, use the defaults as if the user had just hit enter.
- [ ] A test for the above condition