Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

%matplotlib osx crashses

Đang mở
#1,124 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
jupyter-notebook, python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện %matplotlib osx trên macOS Ventura với các phiên bản Python, IPython, Jupyter console và PyQt được báo cáo, sau đó so sánh hành vi của IPython và Jupyter console được mô tả ở đây và trong các issue được liên kết. Công việc được xem là hoàn tất khi lệnh không còn bị crash và hành vi vẽ tương tác như mong đợi được khôi phục, hoặc khi hạn chế này được ghi chú rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

See https://github.com/jupyter/jupyter_console/issues/294 and https://github.com/jupyterlab/jupyterlab/issues/14653

Original reporter is @ubaldot

Output of %matplotlib osx gives the following error message:

2023-05-03 19:46:24.850 python[46916:7042851] *** Assertion failure in +[NSEvent otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:], NSEvent.m:647
2023-05-03 19:46:24.852 python[46916:7042851] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: _NSEventMask64FromType(type) & WeirdMask'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001aa69319c __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x00000001aa1b24d4 objc_exception_throw + 60
	2   Foundation                          0x00000001ab645b88 -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x00000001ad9dad50 +[NSEvent otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:] + 264
	4   libffi.8.dylib                      0x0000000105ac404c ffi_call_SYSV + 76
	5   libffi.8.dylib                      0x0000000105ac1790 ffi_call_int + 1256
	6   _ctypes.cpython-310-darwin.so       0x0000000105aa4a30 _ctypes_callproc + 1324
	7   _ctypes.cpython-310-darwin.so       0x0000000105a9ebf8 PyCFuncPtr_call + 1160
	8   python3.10                          0x0000000104ed2294 _PyObject_MakeTpCall + 612
	9   python3.10                          0x0000000104fc10f0 call_function + 676
	10  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	11  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	12  python3.10                          0x0000000104fc1058 call_function + 524
	13  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	14  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	15  _ctypes.cpython-310-darwin.so       0x0000000105aa2e0c closure_fcn + 644
	16  libffi.8.dylib                      0x0000000105ac1b6c ffi_closure_SYSV_inner + 796
	17  libffi.8.dylib                      0x0000000105ac41d4 ffi_closure_SYSV + 52
	18  CoreFoundation                      0x00000001aa63448c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
	19  CoreFoundation                      0x00000001aa634134 __CFRunLoopDoTimer + 940
	20  CoreFoundation                      0x00000001aa633c8c __CFRunLoopDoTimers + 356
	21  CoreFoundation                      0x00000001aa61941c __CFRunLoopRun + 1852
	22  CoreFoundation                      0x00000001aa61858c CFRunLoopRunSpecific + 612
	23  HIToolbox                           0x00000001b3e4ddf4 RunCurrentEventLoopInMode + 292
	24  HIToolbox                           0x00000001b3e4dc30 ReceiveNextEventCommon + 648
	25  HIToolbox                           0x00000001b3e4d988 _BlockUntilNextEventMatchingListInModeWithFilter + 76
	26  AppKit                              0x00000001ad837f58 _DPSNextEvent + 636
	27  AppKit                              0x00000001ad8370f4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
	28  AppKit                              0x00000001ad82b558 -[NSApplication run] + 464
	29  libffi.8.dylib                      0x0000000105ac404c ffi_call_SYSV + 76
	30  libffi.8.dylib                      0x0000000105ac1790 ffi_call_int + 1256
	31  _ctypes.cpython-310-darwin.so       0x0000000105aa4a30 _ctypes_callproc + 1324
	32  _ctypes.cpython-310-darwin.so       0x0000000105a9ebf8 PyCFuncPtr_call + 1160
	33  python3.10                          0x0000000104ed2294 _PyObject_MakeTpCall + 612
	34  python3.10                          0x0000000104fc10f0 call_function + 676
	35  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	36  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	37  python3.10                          0x0000000104fc1058 call_function + 524
	38  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	39  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	40  python3.10                          0x0000000104fc1058 call_function + 524
	41  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	42  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	43  python3.10                          0x000000010506ab04 partial_vectorcall + 396
	44  python3.10                          0x0000000104fc1058 call_function + 524
	45  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	46  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	47  python3.10                          0x0000000104ed5aac method_vectorcall + 516
	48  python3.10                          0x0000000104fd9b78 context_run + 348
	49  python3.10                          0x0000000104f258a8 cfunction_vectorcall_FASTCALL_KEYWORDS + 112
	50  python3.10                          0x0000000104fbd160 _PyEval_EvalFrameDefault + 27276
	51  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	52  python3.10                          0x0000000104fc1058 call_function + 524
	53  python3.10                          0x0000000104fbcdc0 _PyEval_EvalFrameDefault + 26348
	54  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	55  python3.10                          0x0000000104fc1058 call_function + 524
	56  python3.10                          0x0000000104fbcdc0 _PyEval_EvalFrameDefault + 26348
	57  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	58  python3.10                          0x0000000104fc1058 call_function + 524
	59  python3.10                          0x0000000104fbcdc0 _PyEval_EvalFrameDefault + 26348
	60  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	61  python3.10                          0x0000000104fc1058 call_function + 524
	62  python3.10                          0x0000000104fbcdc0 _PyEval_EvalFrameDefault + 26348
	63  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	64  python3.10                          0x0000000104fc1058 call_function + 524
	65  python3.10                          0x0000000104fbcdc0 _PyEval_EvalFrameDefault + 26348
	66  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	67  python3.10                          0x0000000104ed594c method_vectorcall + 164
	68  python3.10                          0x0000000104fc1058 call_function + 524
	69  python3.10                          0x0000000104fbcde8 _PyEval_EvalFrameDefault + 26388
	70  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	71  python3.10                          0x0000000104fb5590 PyEval_EvalCode + 120
	72  python3.10                          0x0000000104fb1108 builtin_exec + 836
	73  python3.10                          0x0000000104f259e4 cfunction_vectorcall_FASTCALL + 200
	74  python3.10                          0x0000000104fc1058 call_function + 524
	75  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	76  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	77  python3.10                          0x0000000104fc1058 call_function + 524
	78  python3.10                          0x0000000104fbce58 _PyEval_EvalFrameDefault + 26500
	79  python3.10                          0x0000000104fb5dc8 _PyEval_Vector + 2056
	80  python3.10                          0x0000000105035164 pymain_run_module + 272
	81  python3.10                          0x00000001050347a0 Py_RunMain + 1584
	82  python3.10                          0x0000000105035c50 pymain_main + 1272
	83  python3.10                          0x0000000104e7c00c main + 56
	84  dyld                                0x00000001aa1e3f28 start + 2236
)
libc++abi: terminating due to uncaught exception of type NSException
/Users/ubaldot/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/jupyter_console/ptshell.py:787: UserWarning: The kernel did not respond to an is_complete_request. Setting `use_kernel_is_complete` to False.
  warn('The kernel did not respond to an is_complete_request. '

I tried to run %matplotlib` both in a IPython and a Jupyter console, getting the following outputs:

  • Using matplotlib backend: MacOSX (IPython)
  • Using matplotlib backend: <object object at 0x104853730> (Jupyter console)

the consequence is that plots in IPython are interactive whereas plots in Jupyter console are rendered as a simple .png.
Example code follows if you want to test:

import matplotlib.pyplot as plt
import matplotlib
x = list(range(1,5))
y = list(map(lambda x: x**2, x))
plt.plot(x,y)

I am running Jupyter console 6.6.3, Python 3.10.8, IPython 8.12.0 with pyqt 5.51.7 installed through conda on Mac Os Ventura.

Ngôn ngữ chính
Python
Star
734
Fork
411
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ipython/ipykernel

Tất cả issue của ipython/ipykernel

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.