Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error traceback when interrupting+terminating python #132017

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@smurfix

Description

@smurfix

Bug report

Bug description:

How to reproduce:

  • start python3
  • interrupt with ^Z
  • resume withfg
  • immediately press ^D (EOF)
$python3>>>^ZStopped$fg^DTraceback (mostrecentcalllast):File"<frozen runpy>",line198,in_run_module_as_mainFile"<frozen runpy>",line88,in_run_codeFile"/usr/lib/python3.13/_pyrepl/__main__.py",line6,in<module>__pyrepl_interactive_console()~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/main.py",line59,ininteractive_consolerun_multiline_interactive_console(console)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File"/usr/lib/python3.13/_pyrepl/simple_interact.py",line142,inrun_multiline_interactive_consolestatement=multiline_input(more_lines,ps1,ps2)File"/usr/lib/python3.13/_pyrepl/readline.py",line389,inmultiline_inputreturnreader.readline()~~~~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/reader.py",line803,inreadlineself.handle1()~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/reader.py",line759,inhandle1event=self.console.get_event(block=False)File"/usr/lib/python3.13/_pyrepl/unix_console.py",line406,inget_eventself.push_char(self.__read(1))~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^File"/usr/lib/python3.13/_pyrepl/unix_console.py",line388,inpush_charself.event_queue.push(char)~~~~~~~~~~~~~~~~~~~~~^^^^^^File"/usr/lib/python3.13/_pyrepl/unix_eventqueue.py",line120,inpushord_char=charifisinstance(char,int)elseord(char)~~~^^^^^^TypeError:ord()expectedacharacter,butstringoflength0found$

Also + likely related: resuming Python doesn't restore the>>> prompt (nor command-line editing) until I press Enter, presumably due to the interactive interpreter not listening to SIGCONT.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp