Ranger: ImportError: sys.meta_path is None, Python is likely shutting down

Created on 26 Jan 2019  路  4Comments  路  Source: ranger/ranger

Runtime Environment

  • Operating system and version: Arch linux
  • Terminal emulator and version: konsole 18.12.1
  • Python version: 3.7.2 (default, Jan 10 2019, 23:51:51) [GCC 8.2.1 20181127]
  • Ranger version/commit: 1.9.2
  • Locale: en_US.UTF-8

Current Behavior

I set: __set save_tabs_on_exit true__ to true. go to a directory. cur all contents from it and forgot to close that tab. after return to ranger, this error accured. actually if i run ranger with __-c__ flag it will open properly or if set __set save_on_exit__ to false, ranger still can be open, but i want to delete all tab history to prevent this error. how do that?

Expected Behavior

Reset tab history and open ranger properly.

Context

Possible Solutions

Steps to reproduce

  1. open ranger normally.

Traceback

ranger version: ranger 1.9.2
Python version: 3.7.2 (default, Jan 10 2019, 23:51:51) [GCC 8.2.1 20181127]
Locale: en_US.UTF-8

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ranger/core/main.py", line 195, in main
    fm.loop()
  File "/usr/lib/python3.7/site-packages/ranger/core/fm.py", line 394, in loop
    ui.redraw()
  File "/usr/lib/python3.7/site-packages/ranger/gui/ui.py", line 339, in redraw
    self.finalize()
  File "/usr/lib/python3.7/site-packages/ranger/gui/ui.py", line 394, in finalize
    DisplayableContainer.finalize(self)
  File "/usr/lib/python3.7/site-packages/ranger/gui/displayable.py", line 264, in finalize
    displayable.finalize()
  File "/usr/lib/python3.7/site-packages/ranger/gui/widgets/view_base.py", line 60, in finalize
    - self.main_column.scroll_begin
AttributeError: 'NoneType' object has no attribute 'pointer'

ranger crashed. Please report this traceback at:
https://github.com/ranger/ranger/issues
Exception ignored in: <generator object Directory.load_bit_by_bit at 0x7f6aa9d2c0c0>
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ranger/container/directory.py", line 467, in load_bit_by_bit
  File "/usr/lib/python3.7/site-packages/ranger/ext/lazy_property.py", line 55, in __get__
  File "/usr/lib/python3.7/site-packages/ranger/gui/ui.py", line 317, in vcsthread
ImportError: sys.meta_path is None, Python is likely shutting down

bug

All 4 comments

Tabs are saved in $XDG_DATA_HOME/ranger/tabs or $XDG_CONFIG_HOME/ranger/tabs you could probably edit that manually to remove the offending path.

I actually think this is a bug, not a feature ; )

Yes. but anybody can fix it with edit the tabs files. anyway. there must be some smart ways to help people in these situations. for example people can run instructions like:
ranger doctor
to see how can fix the errors.

That would be an awesome contribution. Would take too much work for the team currently though but if someone wants to implement it, please do! Just hop into #ranger@freenode and we'll try to help as much as possible.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbn42 picture rbn42  路  3Comments

ycf83 picture ycf83  路  5Comments

vijaymarupudi picture vijaymarupudi  路  5Comments

politas picture politas  路  3Comments

dufferzafar picture dufferzafar  路  5Comments