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

EOFError during first run of jrnl #1777

Open
moore-bryan opened this issue Jul 31, 2023 · 4 comments
Open

EOFError during first run of jrnl #1777

moore-bryan opened this issue Jul 31, 2023 · 4 comments
Labels
bug Something isn't working ready for pr Okay to start work. Feel free to ask questions.
Milestone

Comments

@moore-bryan
Copy link

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

@moore-bryan moore-bryan added 🆕 New! bug Something isn't working labels Jul 31, 2023
@micahellison
Copy link
Member

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.

@micahellison micahellison added needs more info Further information is requested and removed 🆕 New! labels Jul 31, 2023
@moore-bryan
Copy link
Author

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. :-)

@micahellison
Copy link
Member

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.

@micahellison micahellison changed the title Error During Install EOFError During Install Sep 9, 2023
@micahellison micahellison changed the title EOFError During Install EOFError during first run of jrnl Sep 9, 2023
@micahellison
Copy link
Member

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

@micahellison micahellison added this to the Backlog milestone Sep 9, 2023
@micahellison micahellison added ready for pr Okay to start work. Feel free to ask questions. and removed needs more info Further information is requested labels Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for pr Okay to start work. Feel free to ask questions.
Projects
None yet
Development

No branches or pull requests

2 participants