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

euporie-console stuck (unresponsive) for a long time on simple plots #77

Closed
IndianBoy42 opened this issue May 27, 2023 · 5 comments
Closed

Comments

@IndianBoy42
Copy link

I just used the simple plot example from Matplotlib to test out Eupories capabilities:

It immediately gets stuck, completely unresponsive, with any keypresses resulting in the raw keycodes being printed on screen. top or any process monitor shows me that the euporie python process is maxing out one of my cores. And the log with log-level=debug shows that the last line is:

2023-05-27 17:18:59 DEBUG   [euporie.core.convert.core._convert:242] Converting from 'ansi' to 'formatted_text' using route: [['ansi', 'formatted_text']]
2023-05-27 17:19:42 DEBUG   [euporie.core.convert.core._convert:242] Converting from 'base64-png' to 'png' using route: [['base64-png', 'png']]
2023-05-27 17:19:42 DEBUG   [euporie.core.convert.core._convert:242] Converting from 'base64-png' to 'formatted_text' using route: [['base64-png', 'png', 'ansi', 'formatted_text'], ['base64-png', 'png', 'pil', 'ansi', 'formatted_text']]
2023-05-27 17:19:42 DEBUG   [euporie.core.convert.utils.call_subproc:95] Running external command `['viu', '-w', '49', '-s', '-']`

Trying to create/convert(?) the image with viu, which obviously is actually quite fast when run manually.

Any idea what is wrong?

(Using Kitty terminal and kitty graphics)

@IndianBoy42
Copy link
Author

The same happens in notebook

@joouha
Copy link
Owner

joouha commented Jun 5, 2023

Hi,

I think that possibly viu was detecting that your terminal supports kitty graphics and was trying to return kitty graphics rather than block graphics which euporie expects.

Anyway, I've fixed this by adding the -b flag when calling viu for force block graphics output.

I've made a new release with the fix (v2.4.2) which you can try.

@IndianBoy42
Copy link
Author

Interesting, I'll try it once I get back, but if I have kitty graphics shouldnt it be using kitty graphics? Or am I misunderstanding how it's used

@IndianBoy42
Copy link
Author

This works now, thanks!

@joouha
Copy link
Owner

joouha commented Jun 6, 2023

Interesting, I'll try it once I get back, but if I have kitty graphics shouldnt it be using kitty graphics? Or am I misunderstanding how it's used

Euporie generates both block-graphics and terminal graphics (if supported). The block-graphics rendering is used as a fall-back, and is displayed when a UI element such as a menu or dialog box could overlap an image, as most terminals do not support text over graphics.

Euporie does not need an external tool to convert images for display using the kitty graphics protocol, but will use external tools (viu is one of several options) for block-graphics rendering if one is available which is faster / better than the available Python implementation.

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