[Bug 1795278] Re: software-properties-{qt, kde} attempts to use KUrl but it doesn't exist
Walter Lapchynski
wxl at riseup.net
Wed Mar 4 17:06:00 UTC 2020
There are no PyKDE imports anymore, only PyQt. That said, replacing
`KUrl.fromPath` with just `QUrl` should resolve that.
But that's not our only issue:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/qt/SoftwarePropertiesQt.py", line 713, in add_key_clicked
filename = KFileDialog.getOpenFileName(url, 'application/pgp-keys', self.userinterface, _("Import key"))
NameError: name 'KFileDialog' is not defined
So we replace `KFileDialog` with `QFileDialog` and move some arguments
around:
filename = QFileDialog.getOpenFileName(self.userinterface, _("Import
key"), url, 'application/pgp-keys')
The only other thing missing is that KFileDialog wanted a KUrl while
QFileDialog wants a string. So we should cast our QUrl call:
url = str(QUrl(home))
Maybe there's a prettier/better way to do this, but that's what I got
for 10 minutes which is more progress than I can say this bug has had in
the past XD If people can test those changes, it would be greatly
appreciated.
** Changed in: software-properties (Ubuntu)
Status: Confirmed => Triaged
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1795278
Title:
software-properties-{qt,kde} attempts to use KUrl but it doesn't exist
Status in software-properties package in Ubuntu:
Triaged
Bug description:
Release: Kubuntu 18.04
Version: 0.96.24.32.1
When clicking the "Import Key" button in the "Authentication" section
of the panel it throws this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/kde/SoftwarePropertiesKDE.py", line 667, in add_key_clicked
url = KUrl.fromPath(home)
NameError: name 'KUrl' is not defined
While this doesn't crash the program it causes nothing to happen when
clicking the button. Running the program in a terminal reveals the
error being printed to stderr.
After debugging it appears KUrl doesn't exist anywhere and I'm not
sure if's a python module that has changed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1795278/+subscriptions
More information about the foundations-bugs
mailing list