Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranger Crashes on with 'not finding file or directory' #1805

Closed
Dovermore opened this issue Jan 7, 2020 · 6 comments
Closed

Ranger Crashes on with 'not finding file or directory' #1805

Dovermore opened this issue Jan 7, 2020 · 6 comments
Labels
Milestone

Comments

@Dovermore
Copy link

Runtime Environment

  • Operating system and version: Raspbian GNU/Linux 10 (buster)
  • Terminal emulator and version: Alacritty
  • Python version: python3.7.3
  • Ranger version/commit: 1.9.3
  • Locale: Australia

Current Behavior

Running pypl ranger-fm give the following error:

ranger version: ranger 1.9.3
Python version: 3.7.3 (default, Apr  3 2019, 05:39:12) [GCC 8.2.0]
Locale: en_US.UTF-8

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/main.py", line 171, in main
    fm.initialize()
  File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/fm.py", line 132, in initialize
    self.ui.initialize()
  File "/home/pi/.local/lib/python3.7/site-packages/ranger/gui/ui.py", line 127, in initialize
    self.handle_multiplexer()
  File "/home/pi/.local/lib/python3.7/site-packages/ranger/gui/ui.py", line 500, in handle_multiplexer
    ['screen', '-Q', 'title']).strip()
  File "/home/pi/.local/lib/python3.7/site-packages/ranger/ext/spawn.py", line 35, in check_output
    process = Popen(popenargs, stderr=fd_devnull, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'screen': 'screen'

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

Cloning then run ranger.py give the following behavior (python2)

ranger version: ranger-master v1.9.3-1-g3965e3ee
Python version: 2.7.16 (default, Apr  6 2019, 01:42:57) [GCC 8.2.0]
Locale: None.None

Traceback (most recent call last):
  File "/home/pi/scratch/ranger/ranger/core/main.py", line 171, in main
    fm.initialize()
  File "/home/pi/scratch/ranger/ranger/core/fm.py", line 132, in initialize
    self.ui.initialize()
  File "/home/pi/scratch/ranger/ranger/gui/ui.py", line 127, in initialize
    self.handle_multiplexer()
  File "/home/pi/scratch/ranger/ranger/gui/ui.py", line 500, in handle_multiplexer
    ['screen', '-Q', 'title']).strip()
  File "/home/pi/scratch/ranger/ranger/ext/spawn.py", line 35, in check_output
    process = Popen(popenargs, stderr=fd_devnull, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Cloning master and run with python 3 yield

ranger version: ranger-master v1.9.3-1-g3965e3ee
Python version: 3.7.3 (default, Apr  3 2019, 05:39:12) [GCC 8.2.0]
Locale: en_US.UTF-8

Traceback (most recent call last):
  File "/home/pi/scratch/ranger/ranger/core/main.py", line 171, in main
    fm.initialize()
  File "/home/pi/scratch/ranger/ranger/core/fm.py", line 132, in initialize
    self.ui.initialize()
  File "/home/pi/scratch/ranger/ranger/gui/ui.py", line 127, in initialize
    self.handle_multiplexer()
  File "/home/pi/scratch/ranger/ranger/gui/ui.py", line 500, in handle_multiplexer
    ['screen', '-Q', 'title']).strip()
  File "/home/pi/scratch/ranger/ranger/ext/spawn.py", line 35, in check_output
    process = Popen(popenargs, stderr=fd_devnull, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'screen': 'screen'

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

Steps to reproduce

  1. Install ranger via builtin pip3 in raspberry pi 4
  2. Run ranger.

Traceback

Shown above already.

@toonn
Copy link
Member

toonn commented Jan 7, 2020

Are you simply running ranger? Or are you passing any arguments? Are you running ranger inside screen?

@wizzup
Copy link

wizzup commented Jan 15, 2020

Might be something related to Python, I've got the same issue on NixOS after system update.

I am using termite

[wizzup@ ~]$ pwd
/home/wizzup
[wizzup@ ~]$ ranger 
ranger version: ranger 1.9.3
Python version: 3.7.6 (default, Dec 18 2019, 19:23:55) [GCC 9.2.0]
Locale: en_US.UTF-8

Traceback (most recent call last):
  File "/nix/store/qadvz4213ly5s78xdyqsy6d59pzngnjc-ranger-1.9.3/lib/python3.7/site-packages/ranger/core/main.py", line 171, in main
    fm.initialize()
  File "/nix/store/qadvz4213ly5s78xdyqsy6d59pzngnjc-ranger-1.9.3/lib/python3.7/site-packages/ranger/core/fm.py", line 132, in initialize
    self.ui.initialize()
  File "/nix/store/qadvz4213ly5s78xdyqsy6d59pzngnjc-ranger-1.9.3/lib/python3.7/site-packages/ranger/gui/ui.py", line 127, in initialize
    self.handle_multiplexer()
  File "/nix/store/qadvz4213ly5s78xdyqsy6d59pzngnjc-ranger-1.9.3/lib/python3.7/site-packages/ranger/gui/ui.py", line 500, in handle_multiplexer
    ['screen', '-Q', 'title']).strip()
  File "/nix/store/qadvz4213ly5s78xdyqsy6d59pzngnjc-ranger-1.9.3/lib/python3.7/site-packages/ranger/ext/spawn.py", line 35, in check_output
    process = Popen(popenargs, stderr=fd_devnull, **kwargs)
  File "/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'screen': 'screen'

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

@Dovermore
Copy link
Author

Are you simply running ranger? Or are you passing any arguments? Are you running ranger inside screen?

Hi, I am simply running ranger without any argument from a bash console. I am not too sure what do you mean by running it inside screen, but my terminal emulator is alacrity. I connected to the console using SSH and installed ranger via pip and from the master branch.

@wizzup
Copy link

wizzup commented Jan 15, 2020

Found the problem

[wizzup@ ~]$ echo $TERM
screen-256color

It is $TERM, using xterm wont' crash ranger

[wizzup@ ~]$ TERM=xterm ranger

@Dovermore
Copy link
Author

Issue solved, closing now. Tmux with screen is causing the problem.

@toonn toonn added the bug label Jan 15, 2020
@toonn
Copy link
Member

toonn commented Jan 15, 2020

Ranger shouldn't crash just because your TERM=screen*.

@toonn toonn reopened this Jan 15, 2020
@toonn toonn added this to the v1.9.4 milestone Jan 15, 2020
toonn added a commit to tkukurin/ranger that referenced this issue Mar 2, 2020
There were a couple bugs causing ranger to miss opportunities to restore
multiplexer window names in tmux.

Fixes ranger#1805
@toonn toonn closed this as completed in 1cdcce0 Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants