The officially official Devuan Forum!

You are not logged in.

#1 2023-10-19 16:57:53

amaro
Member
Registered: 2022-02-08
Posts: 95  

[SOLVED] ranger crashes when deleting file(s) to Trash

Within 'ranger' I usually delete files completely but recently incidentally clicked on the 'Delete to Trash' option and 'ranger' crashed.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ranger/core/main.py", line 201, in main
    fm.loop()
  File "/usr/lib/python3/dist-packages/ranger/core/fm.py", line 383, in loop
    ui.handle_input()
  File "/usr/lib/python3/dist-packages/ranger/gui/ui.py", line 266, in handle_input
    self.handle_key(key)
  File "/usr/lib/python3/dist-packages/ranger/gui/ui.py", line 196, in handle_key
    elif not DisplayableContainer.press(self, key):
  File "/usr/lib/python3/dist-packages/ranger/gui/displayable.py", line 275, in press
    focused_obj.press(key)
  File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 188, in press
    self.type_key(key)
  File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 214, in type_key
    self._answer_question(answer)
  File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 197, in _answer_question
    callback(answer)
  File "/usr/lib/python3/dist-packages/ranger/config/commands.py", line 759, in _question_callback
    self.fm.execute_file(files, label='trash')
  File "/usr/lib/python3/dist-packages/ranger/core/actions.py", line 459, in execute_file
    filenames = [f.path for f in files]
  File "/usr/lib/python3/dist-packages/ranger/core/actions.py", line 459, in <listcomp>
    filenames = [f.path for f in files]
AttributeError: 'str' object has no attribute 'path'

ranger crashed. Please report this traceback at:
https://github.com/ranger/ranger/issues
removed '/tmp/ranger_cd.UiXA81LWC9'

Is this to be expected or something (ranger dependency) is missing?

p.s. This is on 'chimaera'.

Offline

#2 2023-10-19 19:12:16

deepforest
Member
Registered: 2020-03-24
Posts: 354  

Re: [SOLVED] ranger crashes when deleting file(s) to Trash

Hi. How you use "delete to trash"?
I am install ranger on Daedalus
And use this instructions for  "delete to trash"
https://codeyarns.com/tech/2014-09-22-h … #gsc.tab=0
Here no crash for me.


-=linux its buggy crap that have no antifool protection (c)=- smile
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* smile
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ smile

Offline

#3 2023-10-19 19:18:38

deepforest
Member
Registered: 2020-03-24
Posts: 354  

Re: [SOLVED] ranger crashes when deleting file(s) to Trash

https://github.com/ranger/ranger/pull/1 … 1278062521
rc.conf

map dT shell gio trash %s

Tested, no crash for me

Last edited by deepforest (2023-10-19 19:25:14)


-=linux its buggy crap that have no antifool protection (c)=- smile
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* smile
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ smile

Offline

#4 2023-10-19 19:44:27

amaro
Member
Registered: 2022-02-08
Posts: 95  

Re: [SOLVED] ranger crashes when deleting file(s) to Trash

Thank you very much, deepforest!
It works.
The explanation is here

https://wiki.archlinux.org/title/ranger#Move_to_trash

Offline

Board footer