Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] ipyplot breaks input() functionality in Jupyter Lab

See original GitHub issue

Hey! First off I just wanted to thank you for building this tool, I’ve found it really useful for some exploratory work I’ve been doing.

That said, I just spent a few hours trying to solve an issue that ended up being due to something in the ipyplot implementation.

My Environment

Python 3.7.5 Jupyter Lab 2.2.4 Ubuntu 16.04 inside WSL 2 on Windows 10

The Issue

When running input() in a Jupyter cell, the text-entry box would fail to render, leaving the interpreter frozen waiting for a response and no place to enter it.

The Unexpected Solution

It seems this was tied in some way to how ipyplot modifies the HTML, as I found that simply deleting the cells in my notebook that had previously run ipyplot.plot_class_tabs() made the text entry box for input() suddenly appear. The impact of this was surprisingly expansive, as it would actually cause entirely separate notebooks to exhibit this issue. I figured it out when I saw that closing a notebook containing ipyplot code caused a separate, new notebook to all of a sudden work correctly.

Just wanted to post this here in case you know of a fix, and in case anybody else encounters this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

BotScutterscommented, Aug 13, 2020

Awesome, yeah, using .to_numpy() is how I’ve been making it work thus far. For the distinction between JPG/PNG, I could have sworn I had previously seen an assert statement enforcing that the filetype be jpg, but I’m not finding it now… so maybe I was just hallucinating on that point 😛 If I come across that again I’ll bring it up here.

As for the issue around modifying what’s displayed on the indices, the use case I’m imagining isn’t putting the labels there, but actually values or text that are specific to each image. For example, in using this as a tool for viewing image classification results, I could display the confidence score for each image in that location.

BotScutterscommented, Aug 10, 2020

Hey @karolzak , sure thing, the version I have installed is 1.0.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Images from local file paths not displaying correctly if ...
[Bug] Images from local file paths not displaying correctly if contains ... [Bug] ipyplot breaks input() functionality in Jupyter Lab #8.
Read more >
Plots not showing in Jupyter notebook - python - Stack Overflow
Executing this after displayed the plots for me. Found this here: How do I make matplotlib work in AWS EMR Jupyter notebook?...
Read more >
How to fix Kernel Error or broken Python in Jupyter Notebook
TL;DW BELOW! If you delete or upgrade your python version, you might get a Kernel Error when trying to use Jupyter Notebooks!
Read more >
The dreaded Jupyter * error — what it is, and how to fix it
Jupyter sometimes gets stuck, or wedged, with a * between the [] to the left of a cell. How does it happen, what...
Read more >
Jupyter Tips and Tricks - Christoph Rieke - Medium
%debug and the iPython debugger ; %debug magic command. Whenever you encounter an error or exception, just open a new notebook cell, type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found