The "Import Key File..." button in the "Authentication" tab fails silently when the path of the selected key file includes special characters.
I'm using Ubuntu in Portuguese, so the "/home/$USER/Downloads" folder is named "/home/$USER/Transferências" here.
Adding a key from that folder fails, but adding a key from "/home/$USER" (no special characters) succeeds.
The problem is that, in softwareproperties/gtk/SoftwarePropertiesGtk.py in method SoftwarePropertiesGtk.add_key_clicked() at around line 952:
if res == Gtk.ResponseType.ACCEPT:
try:
if not self.backend.AddKey(chooser.get_filename()): error(self.window_main, _("Error importing selected file"), _("The selected file may not be a GPG key file " "or it might be corrupt."))
except dbus.DBusException as e:
if e._dbus_error_name == 'com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy': logging.error("Authentication canceled, changes have not been saved")
"self.backend.AddKey(chooser.get_filename())" throws a "org.freedesktop.DBus.Python.UnicodeEncodeError" exception for paths with special characters.
This is probably a side effect of switching from Python 2 to 3 (and 'bytes' now being used in network communications where 'str' was previously used).
Another issue is that the error isn't reported to the user, and it should be.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: software-properties-gtk 0.92.37.1
ProcVersionSignature: Ubuntu 3.13.0-37.64-generic 3.13.11.7
Uname: Linux 3.13.0-37-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Oct 14 13:22:21 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-13 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install)
The "Import Key File..." button in the "Authentication" tab fails silently when the path of the selected key file includes special characters.
I'm using Ubuntu in Portuguese, so the "/home/ $USER/Downloads " folder is named "/home/ $USER/Transferê ncias" here.
Adding a key from that folder fails, but adding a key from "/home/$USER" (no special characters) succeeds.
The problem is that, in softwarepropert ies/gtk/ SoftwarePropert iesGtk. py in method SoftwarePropert iesGtk. add_key_ clicked( ) at around line 952:
if res == Gtk.ResponseTyp e.ACCEPT: AddKey( chooser. get_filename( )):
error( self.window_ main,
_( "Error importing selected file"),
_( "The selected file may not be a GPG key file "
"or it might be corrupt.")) SoftwarePropert ies.PermissionD eniedByPolicy' :
logging. error(" Authentication canceled, changes have not been saved")
try:
if not self.backend.
except dbus.DBusException as e:
if e._dbus_error_name == 'com.ubuntu.
"self.backend. AddKey( chooser. get_filename( ))" throws a "org.freedeskto p.DBus. Python. UnicodeEncodeEr ror" exception for paths with special characters.
This is probably a side effect of switching from Python 2 to 3 (and 'bytes' now being used in network communications where 'str' was previously used).
Another issue is that the error isn't reported to the user, and it should be.
ProblemType: Bug properties- gtk 0.92.37.1 ature: Ubuntu 3.13.0- 37.64-generic 3.13.11.7 ture: all
DistroRelease: Ubuntu 14.04
Package: software-
ProcVersionSign
Uname: Linux 3.13.0-37-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Oct 14 13:22:21 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-13 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitec
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install)