Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Milestone
Description
Bug summary
As in the title.
Code for reproduction
Seecommand-lineshell.Thecells`In [1]:`and`In [2]:`arecopy-pastedintheshell.Python3.11.10|packagedbyconda-forge| (main,Oct162024,01:27:36) [GCC13.3.0]Type'copyright','credits'or'license'formoreinformationIPython8.31.0.dev--AnenhancedInteractivePython.Type'?'forhelp.In [1]:%matplotlib ...:importmatplotlib ...:importmatplotlib.pyplotasplt ...: ...:plt.rcParams["figure.figsize"]=(10,7) ...:plt.rcParams["figure.dpi"]=144 ...:plt.rcParams["figure.facecolor"]="white" ...: ...:plt.ion()Usingmatplotlibbackend:qtaggOut[1]:<contextlib.ExitStackat0x7eb903e4f0d0>In [2]:plt.plot([1,2,3],[5,4,6]) ...:plt.pause(10)^C---------------------------------------------------------------------------KeyboardInterruptTraceback (mostrecentcalllast)CellIn[2],line21plt.plot([1,2,3],[5,4,6])---->2plt.pause(10)File~/.../lib/python3.11/site-packages/matplotlib/pyplot.py:756,inpause(interval)754canvas.draw_idle()755show(block=False)-->756canvas.start_event_loop(interval)757else:758time.sleep(interval)File~/.../lib/python3.11/site-packages/matplotlib/backends/backend_qt.py:451,inFigureCanvasQT.start_event_loop(self,timeout)448iftimeout>0:449_=QtCore.QTimer.singleShot(int(timeout*1000),event_loop.quit)-->451with_allow_interrupt_qt(event_loop):452qt_compat._exec(event_loop)File~/.../lib/python3.11/contextlib.py:144,in_GeneratorContextManager.__exit__(self,typ,value,traceback)142iftypisNone:143try:-->144next(self.gen)145exceptStopIteration:146returnFalseFile~/.../lib/python3.11/site-packages/matplotlib/backend_bases.py:1672,in_allow_interrupt(prepare_notifier,handle_sigint)1670signal.signal(signal.SIGINT,old_sigint_handler)1671ifhandler_argsisnotNone:->1672old_sigint_handler(*handler_args)KeyboardInterrupt:---------------------------------------------------------------------------OSErrorTraceback (mostrecentcalllast)File~/.../lib/python3.11/site-packages/matplotlib/backends/backend_qt.py:166,in_allow_interrupt_qt.<locals>.prepare_notifier.<locals>._may_clear_sock()158 @sn.activated.connect159def_may_clear_sock():160# Running a Python function on socket activation gives the interpreter a (...)163# the wakeup. (We need this in case set_wakeup_fd catches a signal other164# than SIGINT and we shall continue waiting.)165try:-->166rsock.recv(1)167exceptBlockingIOError:168# This may occasionally fire too soon or more than once on Windows, so169# be forgiving about reading an empty socket.170passOSError: [Errno9]Badfiledescriptor
Actual outcome
The error is raised.
Expected outcome
No repeatedOSError
.
Additional information
No response
Operating system
No response
Matplotlib Version
3.9.2
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None