kde frontend, ModuleNotFoundError: No module named 'sip'

Bug #1906939 reported by ivanto
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
High
Brian Murray
Hirsute
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

usb-creator-kde does not open

:~$ usb-creator-kde
Traceback (most recent call last):
  File "/usr/bin/usb-creator-kde", line 21, in <module>
    import sip
ModuleNotFoundError: No module named 'sip'

[Test Case]

Run usb-creator-kde and make sure it starts as expected.

[Where problems could occur]

Can't think of anything. Right now the application does not start at all, so it's hard to think of how much more it could regress.

[Original Description]

usb-creator-kde does not open

:~$ usb-creator-kde
Traceback (most recent call last):
  File "/usr/bin/usb-creator-kde", line 21, in <module>
    import sip
ModuleNotFoundError: No module named 'sip'

:~$ lsb_release -rd
Description: Ubuntu Hirsute Hippo (development branch)
Release: 21.04

: ~ $ apt-cache policy usb-creator-kde
usb-creator-kde:
  Installed: 0.3.8
  Candidate: 0.3.8
  Version table:
 *** 0.3.8 500
        500 http://archive.ubuntu.com/ubuntu hirsute / universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu hirsute / universe i386 Packages
        100 / var / lib / dpkg / status

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: usb-creator-kde 0.3.8
ProcVersionSignature: Ubuntu 5.8.0-31.33-generic 5.8.17
Uname: Linux 5.8.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu55
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: LXQt
Date: Sat Dec 5 15:24:43 2020
InstallationDate: Installed on 2020-12-03 (2 days ago)
InstallationMedia: Lubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
PackageArchitecture: all
SourcePackage: usb-creator
UpgradeStatus: Upgraded to hirsute on 2020-12-03 (1 days ago)

Related branches

Revision history for this message
ivanto (ivantu) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usb-creator (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1906939

tags: added: iso-testing
summary: - ModuleNotFoundError: No module named 'sip'
+ kde frontend, ModuleNotFoundError: No module named 'sip'
Revision history for this message
darthkhamul (emmanuel-strobbe) wrote :

This seems to be a simple dependency issue: installing python3-sip packages solved this.

Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

Some more info, with the hope this is helpful.

installing python3-sip didn't work for me:

```
% sudo apt install python3-sip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-sip is already the newest version (4.19.7+dfsg-1ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 83 not upgraded.

% /usr/bin/usb-creator-kde
Traceback (most recent call last):
  File "/usr/bin/usb-creator-kde", line 21, in <module>
    import sip
ModuleNotFoundError: No module named 'sip'
```

This is because of needing to support multiple `python3` versions:

```
% sudo update-alternatives --config python3
There are 3 choices for the alternative python3 (providing /usr/bin/python3).

  Selection Path Priority Status
------------------------------------------------------------
  0 /usr/bin/python3.8 3 auto mode
  1 /usr/bin/python3.6 1 manual mode
* 2 /usr/bin/python3.7 2 manual mode
  3 /usr/bin/python3.8 3 manual mode
```

Installing `sip` (for the python3.7 env) with `python3 -m pip --user --upgrade sip` (keeping the system python install intact, doesn't solve the problem either). Same import error.

If I edit the shebang line of /usr/bin/usb-creator-kde to the more explicit:

    #!/usr/bin/python3.6

the script starts without failing the import.

However, it fails immediately after with a popup "An error occurred while talking to the udisks service"

    systemctl list-units | grep udisks

shows there's a `udisks2` service but not a `udisks` service.

So yes, this is a simple dependency issue that keeps growing over time.

Revision history for this message
ivanto (ivantu) wrote :

~$ dpkg -l | grep sip
ii python3-pyqt5.sip 12.8.1-1build1 amd64 runtime module for Python extensions using SIP
ii python3-sip 4.19.25+dfsg-1 amd64 Python 3/C++ bindings generator runtime library

~$ usb-creator-kde
/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py:140: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.__img is not '':
Icon theme "elementary" not found.

Revision history for this message
Sai Vinoba (saivinob) wrote :

Issue still exists in hirsute daily builds. usb-creator-kde version 0.3.9. Suggested solution on ubuntu-testers telegram group was to replace line `import sip` in `/usr/bin/usb-creator-kde with line `from PyQt5 import sip`. This fixed the issue for me.

Revision history for this message
Brian Murray (brian-murray) wrote :

This bug is being targeted as an SRU for Ubuntu 21.04 and subsequently the bug description could use some SRU information. Please see wiki.ubuntu.com/StableReleaseUpdates for details. Thanks!

Changed in usb-creator (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
Jan Rathmann (kaiserclaudius) wrote :

For me doing 'apt install python3-sip' solves this too, as darthkhamul wrote in #4.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello ivanto, or anyone else affected,

Accepted usb-creator into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/usb-creator/0.3.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

description: updated
Changed in usb-creator (Ubuntu Hirsute):
status: New → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
David Coe (hooligan-red) wrote : Re: [Bug 1906939] Re: kde frontend, ModuleNotFoundError: No module named 'sip'

Hi Łukasz!

On 29/04/2021 08:52, Łukasz Zemczak wrote:
> Hello ivanto, or anyone else affected,
>
> Accepted usb-creator into hirsute-proposed. The package will build now
> and be available at https://launchpad.net/ubuntu/+source/usb-
> creator/0.3.10 in a few hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
> to enable and use -proposed. Your feedback will aid us getting this
> update out to other Ubuntu users.
>
> If this package fixes the bug for you, please add a comment to this bug,
> mentioning the version of the package you tested, what testing has been
> performed on the package and change the tag from verification-needed-
> hirsute to verification-done-hirsute. If it does not fix the bug for
> you, please add a comment stating that, and change the tag to
> verification-failed-hirsute. In either case, without details of your
> testing we will not be able to proceed.
>
> Further information regarding the verification process can be found at
> https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
> advance for helping!
>
> N.B. The updated package will be released to -updates after the bug(s)
> fixed by this package have been verified and the package has been in
> -proposed for a minimum of 7 days.
>

Usb-creator-kde-0.3.10 updated from hirsute-proposed. Successfully
writes usb drive. Many thanks.

--
David Coe

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-creator - 0.3.10

---------------
usb-creator (0.3.10) hirsute; urgency=medium

  * bin/usb-creator-kde: Import sip from the right location thereby avoiding a
    ModuleNotFoundError. Thanks to Sai Vinoba for the fix. (LP: #1906939)

 -- Brian Murray <email address hidden> Mon, 19 Apr 2021 09:13:26 -0700

Changed in usb-creator (Ubuntu):
status: In Progress → Fix Released
Changed in usb-creator (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for usb-creator has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers