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

"list index out of the range" in kitty & iTerm2 in preview image #2940

Open
txl263 opened this issue Jan 24, 2024 · 0 comments
Open

"list index out of the range" in kitty & iTerm2 in preview image #2940

txl263 opened this issue Jan 24, 2024 · 0 comments

Comments

@txl263
Copy link

txl263 commented Jan 24, 2024

Runtime Environment

  • Operating system and version: Arch Linux x86_64
  • Terminal emulator and version: iTerm2 Build 3.5 & kitty 0.32.0
  • Python version: 3.11.6
  • Ranger version/commit: 1.9.3
  • Locale: LANG=zh_CN.UTF-8

Current Behavior

"list index out of the range" in kitty & iTerm2 in preview image

Expected Behavior

Context

Possible Solutions

Steps to reproduce

Traceback

ranger --debug
ranger version: ranger 1.9.3
Python version: 3.11.6 (main, Nov 14 2023, 09:36:21) [GCC 13.2.1 20230801]
Locale: zh_CN.UTF-8
Current file: '/home/Eric/.config/neofetch/pngs/aisaka.png'

Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/ranger/core/main.py", line 201, in main
fm.loop()
File "/usr/lib/python3.11/site-packages/ranger/core/fm.py", line 381, in loop
ui.draw_images()
File "/usr/lib/python3.11/site-packages/ranger/gui/ui.py", line 401, in draw_images
self.browser.columns[-1].draw_image()
File "/usr/lib/python3.11/site-packages/ranger/gui/widgets/pager.py", line 124, in draw_image
self.fm.notify(ex, bad=True)
File "/usr/lib/python3.11/site-packages/ranger/core/actions.py", line 173, in notify
raise obj
File "/usr/lib/python3.11/site-packages/ranger/gui/widgets/pager.py", line 118, in draw_image
self.fm.image_displayer.draw(self.image, self.x, self.y,
File "/usr/lib/python3.11/site-packages/ranger/ext/img_display.py", line 178, in draw
input_gen = self._generate_w3m_input(path, start_x, start_y, width, height)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ranger/ext/img_display.py", line 226, in _generate_w3m_input
fontw, fonth = self._get_font_dimensions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ranger/ext/img_display.py", line 167, in _get_font_dimensions
xpixels, ypixels = int(output[0]), int(output[1])
~~~~~~^^^
IndexError: list index out of range

ranger crashed. Please report this traceback at:
https://github.com/ranger/ranger/issues

aisaka.png
aisaka

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

1 participant