Ranger: NameError: name 're' is not defined

Created on 4 Mar 2017  路  1Comment  路  Source: ranger/ranger

Hello. I got this error:

ranger version: ranger-master 1.9.0b5
Python version: 3.6.0 (default, Jan 16 2017, 12:12:55) [GCC 6.3.1 20170109]
Locale: es_ES.UTF-8

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/ranger/core/main.py", line 114, in main
load_settings(fm, args.clean)
File "/usr/lib/python3.6/site-packages/ranger/core/main.py", line 321, in load_settings
import commands as commands_custom
File "/home/felipe/.config/ranger/commands.py", line 353, in
class setlocal(set_):
File "/home/felipe/.config/ranger/commands.py", line 358, in setlocal
PATH_RE = re.compile(r'^\spath="?(.?)"?\s*$')
NameError: name 're' is not defined

How can I solve it?. I use Arch Linux and I installed Ranger from Aur.

Thanks.

question

Most helpful comment

The problem is caused by an outdated commands.py, more precisely by the module re not being imported. It's fixed by updating your commands.py. Remove the current one completely if you have no customizations, otherwise move the current one and run ranger --copy-config=commands and then add back your customizations.

>All comments

The problem is caused by an outdated commands.py, more precisely by the module re not being imported. It's fixed by updating your commands.py. Remove the current one completely if you have no customizations, otherwise move the current one and run ranger --copy-config=commands and then add back your customizations.

Was this page helpful?
0 / 5 - 0 ratings