#3267·ranger

bad error message when encountering bad bookmark

Author: faretek1Created Aug 14, 2026Updated Aug 14, 2026
ranger version: ranger-master 
Python version: 3.13.13 (main, Apr  7 2026, 18:19:01) [GCC 15.2.0]
Locale: en_US.UTF-8

Traceback (most recent call last):
  File "/nix/store/z83mqqc698z9l6nhg1wv853024mih2r4-ranger-1.9.4-unstable-2026-04-26/lib/python3.13/site-packages/ranger/core/main.py", line 184, in main
    fm.initialize()
    ~~~~~~~~~~~~~^^
  File "/nix/store/z83mqqc698z9l6nhg1wv853024mih2r4-ranger-1.9.4-unstable-2026-04-26/lib/python3.13/site-packages/ranger/core/fm.py", line 170, in initialize
    self.bookmarks.load()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/nix/store/z83mqqc698z9l6nhg1wv853024mih2r4-ranger-1.9.4-unstable-2026-04-26/lib/python3.13/site-packages/ranger/container/bookmarks.py", line 50, in load
    new_dict = self._load_dict()
  File "/nix/store/z83mqqc698z9l6nhg1wv853024mih2r4-ranger-1.9.4-unstable-2026-04-26/lib/python3.13/site-packages/ranger/container/bookmarks.py", line 242, in _load_dict
    dct[key] = self.bookmarktype(value)
               ~~~~~~~~~~~~~~~~~^^^^^^^
  File "/nix/store/z83mqqc698z9l6nhg1wv853024mih2r4-ranger-1.9.4-unstable-2026-04-26/lib/python3.13/site-packages/ranger/container/directory.py", line 130, in __init__
    assert not os.path.isfile(path), "No directory given!"
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: No directory given!

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

this is the error message I received apparently randomly (It appears i must have pressed some button to make a bookmark, although i never use this feature). the fix was to empty the bookmarks at ~/.local/share/bookmarks. perhaps this error message could be better rather than giving a traceback?

im using nixos with ranger. as for the contents of the bookmarks, i have already applied the fix so i no longer have the contents of ~/.local/share/bookmarks, sorry