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

Crash on CTRL-Z #174

Closed
joshnatis opened this issue Oct 5, 2022 · 1 comment
Closed

Crash on CTRL-Z #174

joshnatis opened this issue Oct 5, 2022 · 1 comment

Comments

@joshnatis
Copy link

joshnatis commented Oct 5, 2022

Hi there, thank you for your hard work on this great software :).

Part of my workflow is backgrounding the Python REPL with CTRL-Z and then bringing it back up with fg. This causes bpython to crash.

Reproducer and error trace:

$ bpython
bpython version 0.23 on top of Python 3.8.10 /usr/bin/python3
>>>
CTRL-Z
[4]+  Stopped                 bpython

$ fg
Traceback (most recent call last):
  File "/home/josh/.local/bin/bpython", line 8, in <module>
    sys.exit(main())
  File "/home/josh/.local/lib/python3.8/site-packages/bpython/curtsies.py", line 248, in main
    repl.mainloop(True, paste)
  File "/home/josh/.local/lib/python3.8/site-packages/bpython/curtsies.py", line 180, in mainloop
    for e in inputs:
  File "/home/josh/.local/lib/python3.8/site-packages/bpython/curtsies.py", line 261, in _combined_events
    e = event_provider.send(timeout)
  File "/home/josh/.local/lib/python3.8/site-packages/curtsies/input.py", line 238, in send
    return self._send(timeout)
  File "/home/josh/.local/lib/python3.8/site-packages/curtsies/input.py", line 290, in _send
    stdin_ready_for_read, event = self._wait_for_read_ready_or_timeout(
  File "/home/josh/.local/lib/python3.8/site-packages/curtsies/input.py", line 198, in _wait_for_read_ready_or_timeout
    (rs, _, _) = select.select(
  File "/home/josh/.local/lib/python3.8/site-packages/bpython/curtsiesfrontend/repl.py", line 662, in sigtstp_handler
    self.after_suspend()
  File "/home/josh/.local/lib/python3.8/site-packages/bpython/curtsies.py", line 132, in after_suspend
    self.window.__enter__()
  File "/home/josh/.local/lib/python3.8/site-packages/curtsies/window.py", line 287, in __enter__
    self.cbreak.__enter__()
  File "/usr/lib/python3.8/contextlib.py", line 111, in __enter__
    del self.args, self.kwds, self.func
AttributeError: args
@sebastinas sebastinas transferred this issue from bpython/bpython Oct 5, 2022
@joshnatis
Copy link
Author

Thanks for the super quick turnaround time!!!

thomasballinger pushed a commit to thomasballinger/curtsies that referenced this issue Aug 8, 2024
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