Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 659490 - app-misc/ranger-1.9.1 crashed NameError: name re is not defined
Summary: app-misc/ranger-1.9.1 crashed NameError: name re is not defined
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Tim Harder
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 15:03 UTC by Christian
Modified: 2019-01-04 06:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2018-06-28 15:03:48 UTC
The Issue after the Update:

============ Terminal =================
$ ranger
ranger version: ranger-master 1.9.1
Python version: 3.6.5 (default, Apr 18 2018, 20:03:38) [GCC 7.3.0]
Locale: de_DE.UTF-8

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/ranger/core/main.py", line 120, in main
    load_settings(fm, args.clean)
  File "/usr/lib64/python3.6/site-packages/ranger/core/main.py", line 350, in load_settings
    import commands as commands_custom
  File "/home/christian/.config/ranger/commands.py", line 348, in <module>
    class setlocal(set_):
  File "/home/christian/.config/ranger/commands.py", line 353, in setlocal
    PATH_RE = re.compile(r'^\s*path="?(.*?)"?\s*$')
NameError: name 're' is not defined

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

The issue is known:
https://github.com/ranger/ranger/issues/823

And the Fix is to remove the Users ~/.config/ranger/commands.py because the re Modul in Python was not importet.

The Solution is delete that file an create a new default one:
================ Terminal =============
$ rm .config/ranger/commands.py
christian@computer ~ $ ranger --copy-config=commands
creating: /home/christian/.config/ranger/commands.py

> Please note that configuration files may change as ranger evolves.
  It's completely up to you to keep them up to date.

> To stop ranger from loading both the default and your custom rc.conf,
  please set the environment variable RANGER_LOAD_DEFAULT_RC to FALSE.
=======================================

Anyway, users customizations will got lost.
Comment 1 Tim Harder gentoo-dev 2019-01-04 06:17:17 UTC
Closing as obsolete since there's not much we can do about such things other than add update messages and honestly I think upstream should handle that more transparently in the future, e.g. checking for ImportError or similar and outputting relevant config update info or auto-updating config files where possible.