You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ranger crashes when trying to preview a jupyter notebook file.
Expected Behavior
Show the ipynb file preview or at the very least doe not crash and show blank.
Context
Possible Solutions
Steps to reproduce
Open ranger
Move the file selector to a jupyter notebook file
Traceback
ranger version: ranger 1.9.3ll 52.7K 2024-02-09 15:29 99.9M sum, 741G free 15/38 12%
Python version: 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:03:24) [GCC 12.3.0]
Locale: en_US.UTF-8
Current file: '/path/to/jupyter/notebook/file/data_cleanup.ipynb'
Traceback (most recent call last):
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/core/main.py", line 201, in main
fm.loop()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/core/fm.py", line 377, in loop
ui.redraw()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/ui.py", line 333, in redraw
self.draw()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/ui.py", line 360, in draw
DisplayableContainer.draw(self)
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/displayable.py", line 260, in draw
displayable.draw()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/widgets/view_miller.py", line 100, in draw
DisplayableContainer.draw(self)
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/displayable.py", line 260, in draw
displayable.draw()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/widgets/browsercolumn.py", line 187, in draw
self._draw_file()
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/widgets/browsercolumn.py", line 214, in _draw_file
Pager.draw(self)
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/widgets/pager.py", line 109, in draw
self._draw_line(i, line)
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/widgets/pager.py", line 139, in _draw_line
self.set_fg_bg_attr(*chunk)
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/curses_shortcuts.py", line 89, in set_fg_bg_attr
self.win.attrset(curses.color_pair(get_color(fg, bg)) | attr)
^^^^^^^^^^^^^^^^^
File "/nfs/site/home/adavoody/.pixi/envs/ranger-fm/lib/python3.12/site-packages/ranger/gui/color.py", line 32, in get_color
curses.init_pair(size, fg, bg)
ValueError: Color number is greater than COLORS-1 (7).
The text was updated successfully, but these errors were encountered:
I can not reproduce this. What terminal emulator are you using? Are you using the default color scheme or have other modifications?
If I am using a terminal which does not support 256 colors (i.e. TERM=xterm), ranger will not initialize colors.
Runtime Environment
Current Behavior
Ranger crashes when trying to preview a jupyter notebook file.
Expected Behavior
Show the ipynb file preview or at the very least doe not crash and show blank.
Context
Possible Solutions
Steps to reproduce
Traceback
The text was updated successfully, but these errors were encountered: