Trying to run ranger <file> returns
ranger version: ranger-master 1.9.0b5
Python version: 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Locale: None.None
Traceback (most recent call last):
File "/home/user/ranger-master/ranger/core/main.py", line 196, in main
fm.loop()
File "/home/user/ranger-master/ranger/core/fm.py", line 381, in loop
ui.redraw()
File "/home/user/ranger-master/ranger/gui/ui.py", line 339, in redraw
self.finalize()
File "/home/user/ranger-master/ranger/gui/ui.py", line 392, in finalize
DisplayableContainer.finalize(self)
File "/home/user/ranger-master/ranger/gui/displayable.py", line 264, in finalize
displayable.finalize()
File "/home/user/ranger-master/ranger/gui/widgets/view_base.py", line 60, in finalize
- self.main_column.scroll_begin
AttributeError: 'NoneType' object has no attribute 'pointer'
Is it possible to open ranger with files, not directories, in argument ? To open tabs with thoses files selected. Not sure it's supposed to be supported for multiple files since there's the --selectfile flag.
I'm on Ubuntu 16.04.
You are correct. Files are opened via --selectfile. I think what can be done here is updating the usage/help message for the command to point out that [path] is actually [dir], and not just any arbitrary filesystem path. JM2C.
I'm getting a similar, but different error:
ranger version: ranger-master 1.9.1
Python version: 2.7.14 (default, Sep 16 2017, 17:49:51) [GCC 7.3.0]
Locale: None.None
Traceback (most recent call last):
File "/nix/store/a2669py3h1h95wapk72b279sbac3c7ap-ranger-1.9.1/lib/python2.7/site-packages/ranger/core/main.py", line 196, in main
fm.loop()
File "/nix/store/a2669py3h1h95wapk72b279sbac3c7ap-ranger-1.9.1/lib/python2.7/site-packages/ranger/core/fm.py", line 390, in loop
ui.redraw()
File "/nix/store/a2669py3h1h95wapk72b279sbac3c7ap-ranger-1.9.1/lib/python2.7/site-packages/ranger/gui/ui.py", line 338, in redraw
self.draw()
File "/nix/store/a2669py3h1h95wapk72b279sbac3c7ap-ranger-1.9.1/lib/python2.7/site-packages/ranger/gui/ui.py", line 367, in draw
cwd = self.fm.thisdir.path
AttributeError: 'NoneType' object has no attribute 'path'
ranger crashed. Please report this traceback at:
https://github.com/ranger/ranger/issues
Ranger 1.8 used to just say you're not supposed to open files with ranger, only paths.
I'd prefer ranger to just open the dir the file is in, without complaining.
Just started using ranger, quickly ran into this bug.
I'd prefer ranger to just open the dir the file is in, without complaining.
Except it'd be better if the specified file was selected... which would make it the same as --selectfile. Why isn't that the default behavior if you specify a file argument to ranger?
Note that --selectfile used to be necessary because rifle wasn't its own command yet so calling ranger /path/to/somefile would do what rifle /path/to/somefile does now.
It would be awesome if some people could test #1132, you'll need to clone it from github and then you can run ranger.py as if it's ranger.