Opened 5 years ago

Closed 5 years ago

#3272 closed bug (Fixed)

'Open Download Folder' feature doesn't work in 2.0.3

Reported by: Alexey Owned by: Calum
Priority: minor Milestone: 2.0.4
Component: GTK UI Version: 2.0.3
Keywords: Open Folder, 2.0.3 Cc:

Description

Hi, guys! Sorry, my English is far from perfect, but i'll try to explain my problem correctly: My OS is ArchLinux. I've just upgraded to deluge version 2.0.3, and after that 'Open Download Folder' feature stopped working for me. When i perform right click on any downloaded torrent and select 'Open Download Folder', nothing happens. I have python-xdg and xdg-utils installed, i've also set my default file manager via xdg-mime, and it works fine with other applications, such as Firefox etc., but it doesn't work with new deluge version. I didn't have this issue before the update.

If i start deluge(gui version) via terminal, i don't get any error messages, but when i'm trying to open download folder, i get this in my terminal:

Unhandled error in Deferred:
14:32:59 [CRITICAL][twisted                           :154 ] Unhandled error in Deferred:
14:32:59 [CRITICAL][twisted                           :154 ] Unhandled error in Deferred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/gi/overrides/Gtk.py", line 1630, in main
    return _Gtk_main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py", line 325, in on_menuitem_open_folder_activate
    ).addCallback(_on_torrent_status)
  File "/usr/lib/python3.7/site-packages/twisted/internet/defer.py", line 322, in addCallback
    callbackKeywords=kw)
  File "/usr/lib/python3.7/site-packages/twisted/internet/defer.py", line 311, in addCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python3.7/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py", line 320, in _on_torrent_status
    deluge.common.show_file(path, timestamp=timestamp)
  File "/usr/lib/python3.7/site-packages/deluge/common.py", line 361, in show_file
    'org.freedesktop.FileManager1', '/org/freedesktop/FileManager1'
  File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python3.7/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.7/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python3.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.FileManager1 was not provided by any .service files

14:32:59 [CRITICAL][deluge.log                        :93  ] twisted.internet.defer 
[Failure instance: Traceback: <class 'dbus.exceptions.DBusException'>: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.FileManager1 was not provided by any .service files
/usr/lib/python3.7/site-packages/gi/overrides/Gtk.py:1630:main
/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py:325:on_menuitem_open_folder_activate
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:322:addCallback
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:311:addCallbacks
--- <exception caught here> ---
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py:320:_on_torrent_status
/usr/lib/python3.7/site-packages/deluge/common.py:361:show_file
/usr/lib/python3.7/site-packages/dbus/bus.py:241:get_object
/usr/lib/python3.7/site-packages/dbus/proxies.py:248:__init__
/usr/lib/python3.7/site-packages/dbus/bus.py:180:activate_name_owner
/usr/lib/python3.7/site-packages/dbus/bus.py:278:start_service_by_name
/usr/lib/python3.7/site-packages/dbus/connection.py:651:call_blocking
]
14:32:59 [CRITICAL][deluge.log                        :93  ] twisted.internet.defer 
[Failure instance: Traceback: <class 'dbus.exceptions.DBusException'>: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.FileManager1 was not provided by any .service files
/usr/lib/python3.7/site-packages/gi/overrides/Gtk.py:1630:main
/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py:325:on_menuitem_open_folder_activate
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:322:addCallback
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:311:addCallbacks
--- <exception caught here> ---
/usr/lib/python3.7/site-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3.7/site-packages/deluge/ui/gtk3/menubar.py:320:_on_torrent_status
/usr/lib/python3.7/site-packages/deluge/common.py:361:show_file
/usr/lib/python3.7/site-packages/dbus/bus.py:241:get_object
/usr/lib/python3.7/site-packages/dbus/proxies.py:248:__init__
/usr/lib/python3.7/site-packages/dbus/bus.py:180:activate_name_owner
/usr/lib/python3.7/site-packages/dbus/bus.py:278:start_service_by_name
/usr/lib/python3.7/site-packages/dbus/connection.py:651:call_blocking
]

Change History (10)

comment:1 by int3l, 5 years ago

Please provide the name of your Desktop Environment and version, since this most likely is an issue between D-Bus and your specific desktop env :) As a workaround for the failing D-Bus action - I guess that deluge can fallback to xdg-open (No handling for failing D-Bus action get_object)?

comment:2 by Alexey, 5 years ago

Thanks for your reply! I'm using i3wm version 4.16.1. I've just installed an older version of deluge(1.3.15) and i have no any problems with it. Despite i don't know python at all, i'll try your workaround. Thanks for pointing it out!

comment:3 by int3l, 5 years ago

I will try to contribute a patch for the workaround :)

comment:4 by Alexey, 5 years ago

Thanks a lot, I appreciate your help!

comment:5 by Alexey, 5 years ago

Just want to thank you once again! I've changed the line 360 to this:

filemanager1 = subprocess.Popen(['xdg-open', os.path.dirname(path.rstrip('/'))])

and now it works fine! I'm not sure if i did it right, because i'm still getting a whole bunch of error messages in the terminal, but it solved the issue for me and now file manager opens.

comment:6 by int3l, 5 years ago

You can check my solution if you want: Github: Fallback functionality for dbus file manager

Last edited 5 years ago by int3l (previous) (diff)

comment:7 by Alexey, 5 years ago

Your solution works fine! Thanks for fixing my problem and have a nice day:)

comment:8 by int3l, 5 years ago

Owner: set to Calum
Status: newassigned

comment:9 by Calum, 5 years ago

Milestone: needs verified2.0.4

comment:10 by Calum, 5 years ago

Resolution: Fixed
Status: assignedclosed

Fixed: [833b5a1f30]

Note: See TracTickets for help on using tickets.