matplotlib / matplotlib/ipympl

RuntimeError: libpng signaled error

Ouverte
#127 16 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Jupyter Notebook
Étoiles
1.7k
Forks
234
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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
```

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par backend_nbagg.py de ipympl et par le chemin de matplotlib dans backend_webagg_core.py passant par handle_draw(), refresh_all() et get_diff_image(), en particulier l’appel à _png.write_png indiqué dans le traceback. Reproduisez l’échec avec les versions signalées de Python, ipympl, matplotlib et libpng, puis définissez un exemple minimal et une couverture de régression démontrant que l’erreur ne se produit plus.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
jupyter-notebook, python
Domaine
backend, web-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.