matplotlib / matplotlib/ipympl
RuntimeError: libpng signaled error
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 1.7k
- Fork
- 234
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Sometimes I am getting this error with the trunk version. Not sure what a MWE would be. Has anyone encountered this?
Thanks, Chaffra
```
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/ipympl/backend_nbagg.py in _handle_message(self, object, content, buffers)
178 self.manager.resize(w, h)
179 else:
--> 180 self.manager.handle_json(content)
181
182 def send_json(self, content):
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in handle_json(self, content)
437
438 def handle_json(self, content):
--> 439 self.canvas.handle_event(content)
440
441 def refresh_all(self):
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in handle_event(self, event)
238 handler = getattr(self, 'handle_{0}'.format(e_type),
239 self.handle_unknown_event)
--> 240 return handler(event)
241
242 def handle_unknown_event(self, event):
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in handle_draw(self, event)
254
255 def handle_draw(self, event):
--> 256 self.draw()
257
258 def _handle_mouse(self, event):
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in draw(self)
151 super().draw()
152 finally:
--> 153 self.manager.refresh_all() # Swap the frames.
154
155 def draw_idle(self):
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in refresh_all(self)
441 def refresh_all(self):
442 if self.web_sockets:
--> 443 diff = self.canvas.get_diff_image()
444 if diff is not None:
445 for s in self.web_sockets:
/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_webagg_core.py in get_diff_image(self)
199 buff = _png.write_png(
200 output.view(dtype=np.uint8).reshape(output.shape + (4,)),
--> 201 None, compression=6, filter=_png.PNG_FILTER_NONE)
202
203 # Swap the renderer frames
RuntimeError: libpng signaled error
```
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với backend_nbagg.py của ipympl và đường đi của matplotlib qua backend_webagg_core.py, thông qua handle_draw(), refresh_all() và get_diff_image(), đặc biệt là lệnh gọi _png.write_png được hiển thị trong traceback. Tái hiện lỗi trên các phiên bản Python, ipympl, matplotlib và libpng đã được báo cáo, sau đó xác định một ví dụ tối thiểu và phạm vi kiểm thử hồi quy cho thấy lỗi không còn xảy ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- jupyter-notebook, python
- Lĩnh vực
- backend, web-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100