Opened 5 years ago

Last modified 6 months ago

#2341 reopened bug

[win32] Problems installing/enabling plugins with non-ascii username

Reported by: Arpy222 Owned by:
Priority: minor Milestone: 2.x
Component: GTK UI Version: 1.3.6
Keywords: Cc:

Description

I tried to install some 3rd party plugins (Stats, Total Traffic, Traffic Limits), but they didn't show up in the UI nowhere. The GUI Install doesn't work, can't add the plugins. With manual install, they become avaiable in the list, and I can enable it, and probably works in the background (there are up to date conf files in the appdata to the plugins). Tried on two different PC, both running Windows 8 x64 operating system. The problem occurs in classic and non-classic mode too.

Change History (14)

comment:1 Changed 5 years ago by csorvagep

I have the same problem. When I want to install a new plugin in the GUI, the open and the cancel button becomes functionless. (Or freeze in the background)

comment:2 Changed 5 years ago by Cas

  • Resolution set to invalid
  • Status changed from new to closed

You need to install the correct plugin python version as per the instructions:

http://dev.deluge-torrent.org/wiki/Plugins#InstallingPlugins

comment:3 Changed 5 years ago by Arpy222

We both tried py2.6 version plugins. I tried now the built-in plugins, and only the Label and the Scheduler worked well.

comment:4 Changed 5 years ago by Cas

When you say UI are you referring to the Web or GTK UI?

comment:5 Changed 5 years ago by Arpy222

It's under the GTK UI.

comment:6 Changed 5 years ago by Cas

  • Resolution invalid deleted
  • Status changed from closed to reopened

There is no known problems with installing plugins so you will need to provide debug logs for installing/enabling the plugins to determine the precise issue.

comment:7 Changed 5 years ago by Arpy222

Alright, deluge-debug give the following errors:
--When I try to install the TotalTraffic? plugin under GUI:

Traceback (most recent call last):
  File "deluge\ui\gtkui\preferences.py", line 947, in _on_button_plugin_install_
clicked
  File "shutil.py", line 50, in copyfile
IOError: [Errno 2] No such file or directory: 'C:\\Users\\\xc3\x81rp\xc3\xa1d\\D
ownloads\\TotalTraffic-0.5-py2.6.egg'

--When I try to enable the built-in AutoAdd? plugin:

(deluge:5628): libglade-WARNING **: could not find glade file 'C:\Users\\xc1rp\x
e1d\AppData\Roaming\Python-Eggs\autoadd-1.04-py2.6.egg-tmp\autoadd\data\config.g
lade'
[ERROR   ] 01:10:52 init:50 Unable to enable plugin!
[ERROR   ] 01:10:52 __init__:1088 could not create GladeXML object
Traceback (most recent call last):
  File "deluge\plugins\init.py", line 48, in enable
  File "c:\program files (x86)\deluge\deluge-1.3.6-py2.6.egg\deluge\plugins\auto
add-1.04-py2.6.egg\autoadd\gtkui.py", line 225, in enable
    self.glade = gtk.glade.XML(get_resource("config.glade"))
RuntimeError: could not create GladeXML object

I think the problem is these path: C:\Users
xc1rp\xe1d\AppData?\
but it should find at: C:\Users\Árpád\AppData?

Regards, Arpy

comment:8 Changed 5 years ago by Cas

  • Component changed from other to gtkui
  • Milestone changed from 1.3.x to 1.3.7
  • Summary changed from [win64bit] 3rd party plugins is not visible to [win32] Problems installing/enabling plugins with non-ascii username

Ah the non-ascii username issue, I remember a user on IRC mentioning this.

We can solve the plugin install issue but I am not sure we can solve the plugin enabling issue as that Python-Eggs resource path is not part of the Deluge code so likely a bug in Python.

If possible could you test the Python 2.7 version to see if it was fixed there: http://download.deluge-torrent.org/windows/py2.7/

comment:9 Changed 5 years ago by Arpy222

It has the same behaviour, built-in plugin gives the same error message.
Adding 3rd party plugin from non-ascii path, gives the same error.
But when I try to install the plugin from a C:\TotalTraffic?-0.5-py2.7.egg (doesn't contain non-ascii character), it installed well, but when I enable it, it gives the following error continously:

(deluge:1856): libglade-WARNING **: could not find glade file 'C:\Users\\xc1rp\x
e1d\AppData\Roaming\Python-Eggs\totaltraffic-0.5-py2.7.egg-tmp\totaltraffic\data
\config.glade'
[ERROR   ] 01:54:49 init:50 Unable to enable plugin!
[ERROR   ] 01:54:49 __init__:1172 could not create GladeXML object
Traceback (most recent call last):
  File "deluge\plugins\init.py", line 48, in enable
  File "c:\users\árpád\appdata\roaming\deluge\plugins\totaltraffic-0.5-py2.7.egg
\totaltraffic\gtkui.py", line 52, in enable
    self.glade = gtk.glade.XML(get_resource("config.glade"))
RuntimeError: could not create GladeXML object
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "twisted/protocols/policies.py", line 120, in dataReceived

  File "deluge\ui\client.py", line 179, in dataReceived

  File "twisted/internet/defer.py", line 381, in callback

  File "twisted/internet/defer.py", line 489, in _startRunCallbacks

--- <exception caught here> ---
  File "twisted/internet/defer.py", line 576, in _runCallbacks

  File "c:\users\árpád\appdata\roaming\deluge\plugins\totaltraffic-0.5-py2.7.egg
\totaltraffic\gtkui.py", line 86, in cb_get_status
    self.status_item.set_text("%s/%s" % (st["down"], st["up"]))
exceptions.AttributeError: 'GtkUI' object has no attribute 'status_item'
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "twisted/protocols/policies.py", line 120, in dataReceived

  File "deluge\ui\client.py", line 179, in dataReceived

  File "twisted/internet/defer.py", line 381, in callback

  File "twisted/internet/defer.py", line 489, in _startRunCallbacks

--- <exception caught here> ---
  File "twisted/internet/defer.py", line 576, in _runCallbacks

  File "c:\users\árpád\appdata\roaming\deluge\plugins\totaltraffic-0.5-py2.7.egg
\totaltraffic\gtkui.py", line 86, in cb_get_status
    self.status_item.set_text("%s/%s" % (st["down"], st["up"]))
exceptions.AttributeError: 'GtkUI' object has no attribute 'status_item'
[ERROR   ] 01:54:50 init:57 Unable to disable plugin!
[ERROR   ] 01:54:50 __init__:1172 'GtkUI' object has no attribute 'status_item'
Traceback (most recent call last):
  File "deluge\plugins\init.py", line 55, in disable
  File "c:\users\árpád\appdata\roaming\deluge\plugins\totaltraffic-0.5-py2.7.egg
\totaltraffic\gtkui.py", line 76, in disable
    component.get("StatusBar").remove_item(self.status_item)
AttributeError: 'GtkUI' object has no attribute 'status_item'

It seems it's good in some place --> c:\users\árpád\appdata

comment:10 Changed 4 years ago by Cas

The workaround is to set PYTHON_EGG_CACHE environment variable to point to an ascii path.

comment:11 Changed 4 years ago by gazpachoking

We may be able to fix this on windows if we pass our filename as an unicode string. I'll do some testing.

comment:12 Changed 3 years ago by Cas

It is going to be annoying to fix the egg cache issue. We need to apply decode_string (the develop branch function specifically) to the pkg_resources.resource_filename call, which is located in plugin code. This means that all plugins will need updating to fix this issue.

In addition, this issue will affect the main Deluge program if it is located in a non-ascii directory so again all calls to pkg_resources.resource_filename would need to be decoded!

comment:13 Changed 3 years ago by Cas

  • Milestone changed from 1.3.7 to 1.4.0

comment:14 Changed 6 months ago by Cas

  • Milestone changed from 2.0.x to 2.x

Milestone renamed

Note: See TracTickets for help on using tickets.