The overwrite and continue prompts crash with 'an unknown error occurred: EOFError' when stdin is not a terminal

Open Beginner friendly
#1,041 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start in pybnf/pybnf.py at lines 207 and 273, where input() prompts ask whether to continue a run or overwrite files. Check how the CLI detects whether stdin is a terminal and how it handles -o and output_dir; then run the existing tests for these prompts. Done means a non-terminal run with an existing output directory exits with a helpful message naming the directory and explaining how to proceed, without raising EOFError.

Written by the indexing model from the issue text.

Description

bug minor

pybnf/pybnf.py:207 (continue an in-progress run?) and :273 (overwrite a previous run's files?) call input().

Run with no terminal, under CI, nohup or an automated agent, with an existing output_dir, and PyBNF prints "an unknown error occurred: EOFError".

Fix: with no terminal, refuse with a message that names the directory and how to proceed (-o to overwrite, or a new output_dir), instead of crashing.

Dominant language
Python
Stars
25
Forks
25
Avg merge
4h 5m
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/PyBNF

All issues in lanl/PyBNF

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.