matplotlib / matplotlib/ipympl

RuntimeError: libpng signaled error

Aperta
#127 16 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Jupyter Notebook
Stelle
1.7k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da backend_nbagg.py di ipympl e dal percorso di matplotlib in backend_webagg_core.py attraverso handle_draw(), refresh_all() e get_diff_image(), in particolare la chiamata a _png.write_png mostrata nel traceback. Riproduci il problema con le versioni segnalate di Python, ipympl, matplotlib e libpng, quindi definisci un esempio minimo e una copertura di regressione che dimostrino che l'errore non si verifica più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
jupyter-notebook, python
Ambito
backend, web-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.