Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with IPython #11

Open
eulerfan271 opened this issue Jul 10, 2020 · 1 comment
Open

Fails with IPython #11

eulerfan271 opened this issue Jul 10, 2020 · 1 comment

Comments

@eulerfan271
Copy link

In an IPython (or Jupyter) console, imgcat errors and fails to load images, even when using kitty and explicitly setting the TERM environment variable to xterm-kitty. I'm not sure if this a bug report or feature request (or even a problem with Jupyter!), especially since the IPython/Jupyter console explicitly changes the TERM environment variable. I think this would be a useful feature/fix in any case, as an IPython provides many benefits over a python REPL.

Steps to reproduce:
-Start an IPython or Jupyter console using kitty (problem occurs with both python 3.6 and 3.8 for me)
-Explicitly change TERM value with %set_env TERM=xterm-kitty [or don't, doesn't make a difference in the outcome :)]
-Set matplotlib backend to imgcat, and plot something
-imgcat throws 'OutStream' object has no attribute 'buffer'

The module is working perfectly for me in kitty in a python REPL. Thanks for this great project!

@wookayin
Copy link
Owner

wookayin commented Sep 7, 2020

Yes, I agree we need to detect ipython as a runtime and make the imgcat() function work properly. For now, you can use a ipython magic:

%load_ext imgcat
%imgcat (a python image object)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants