Bug 1662328 - picard can't find module PyQt5.sip
Summary: picard can't find module PyQt5.sip
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: picard
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gerald Cox
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-27 18:14 UTC by hugotrip
Modified: 2019-01-29 03:00 UTC (History)
5 users (show)

Fixed In Version: picard-2.1.0-1.fc29 picard-2.1.0-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-24 04:31:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description hugotrip 2018-12-27 18:14:39 UTC
Description of problem:
I can't launch picard

Version-Release number of selected component (if applicable):
2.0.4.2.fc29

How reproducible:
Always

Additional info:
Using terminal I get the error :
ModuleNotFoundError: No module named 'PyQt5.sip'

but I have python3-pyqt5 installed, and even python3-pyqt5-sip (which isn't required by picard rpm, by the way) with sip.pyi & sip.so being installed in folder /usr/lib64/python3.7/site-packages/PyQt5/.

and /usr/lib64/python3.7/site-packages is one of the folders looked after by python3, as says to me the command python3 -c "import sys; print(sys.path)"

Comment 1 Justin W. Flory (Fedora) 2019-01-20 06:28:15 UTC
I couldn't replicate this bug in my environment with the package, but I built picard-2.1-1.fc29 in this pull request:

  https://src.fedoraproject.org/rpms/picard/pull-request/3

It may help to retry with an updated version of Picard. If a Fedora maintainer could review the PR and merge it if it looks good, that would be awesome.

Comment 2 Fedora Update System 2019-01-20 15:37:35 UTC
picard-2.1.0-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-05c4cc9bc7

Comment 3 Fedora Update System 2019-01-20 15:38:03 UTC
picard-2.1.0-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f5fe455974

Comment 4 Fedora Update System 2019-01-21 02:31:34 UTC
picard-2.1.0-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-05c4cc9bc7

Comment 5 Fedora Update System 2019-01-21 03:04:25 UTC
picard-2.1.0-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-f5fe455974

Comment 6 hugotrip 2019-01-21 08:30:55 UTC
Thank you for this try.
using updates-testing, I updated picard to 2.1.0-1.fc29.x86_64, but I still got the same error ModuleNotFoundError: No module named 'PyQt5.sip'
the only difference in the error message is the line where the call to the PyQt5 module is done in /usr/lib64/python3.7/site-packages/picard/tagger.py

exactly the full message is now :
Traceback (most recent call last):
  File "/usr/bin/picard", line 2, in <module>
    from picard.tagger import main; main('/usr/share/locale', True)
  File "/usr/lib64/python3.7/site-packages/picard/tagger.py", line 33, in <module>
    from PyQt5 import (
ModuleNotFoundError: No module named 'PyQt5.sip'

Giving additional information, the last functional try was before my upgrade from F28 t F29 : the switch from python2 to python3 in picard isn't the only suspect

Since then, i also tried typing "python3 /usr/lib64/python3.7/site-packages/picard/tagger.py" and it gave me the same error.

I'm not a programmer at all, but I looked in tagger.py, and It gave me less understanding of the error : there's no call directly to a module sip from PyQt5 (especially on line 33, on picard-2.1)

By the way, looking at the modules called on line 33 their name suggests they're pretty basic : If you know about a fedora package of a python program using them, I can test it, to see if it's more a PyQt5 than a picard problem.

Comment 7 Gerald Cox 2019-01-21 12:13:01 UTC
Upgrade to Picard 2.1.0:
Version 2.1.0 - 2018-12-20

** Bug-fix
    * [PICARD-105] - Picard won't load non-album tracks from fingerprints
    * [PICARD-421] - Releases in private collections are not shown as being in them
    * [PICARD-518] - Sliders without labels in "Options - Metadata - Preferred Releases"
    * [PICARD-637] - $matchedtracks is broken
    * [PICARD-875] - AIFF does not support any of the compatid3 tags
    * [PICARD-949] - Track can be placed in the incorrect spot on the release after using Scan
    * [PICARD-1013] - False file save error in specific circumstances
    * [PICARD-1060] - Collections menu not displayed correctly anymore
    * [PICARD-1112] - Cannot save tags that were previously deleted from file
    * [PICARD-1133] - Plugins list doesn't load automatically after setting proxy
    * [PICARD-1162] - Solo vocals are tagged wrong
    * [PICARD-1219] - Picard creating empty ID3 TIPL / TMCL / IPLS frames
    * [PICARD-1245] - Set field "Grouping" doesn't work as expected
    * [PICARD-1275] - After uninstalling a plugin Picard needs to be restarted for it to be reinstalled
    * [PICARD-1281] - Picard has wrong version string on macOS
    * [PICARD-1320] - Black text on a dark theme
    * [PICARD-1332] - Deleted tags for matched files stay deleted
    * [PICARD-1336] - MP4 reports "bpm" as unsupported tag
    * [PICARD-1339] - Removing unclustered files can be very slow
    * [PICARD-1340] - File info doesn't display Mono / Stereo in Channels field anymore
    * [PICARD-1341] - Cluster track order misinterprets disc/track numbers
    * [PICARD-1346] - Move additional files fails if multiple patterns match
    * [PICARD-1348] - Keyboard shortcuts broken due to localization
    * [PICARD-1350] - Drag and drop on cover image box does not always work as expected
    * [PICARD-1355] - Setting or unsetting album for non-album tracks does not work
    * [PICARD-1359] - Crash with tagger integration when using DuckDuckGo Privacy Essentials
    * [PICARD-1364] - picard.exe has no version tag
    * [PICARD-1368] - Info messages are not shown on logging level Info
    * [PICARD-1369] - Crash on Python 3.7.0 opening URLs
    * [PICARD-1370] - Windows installer to add "Quick Launch" icon no longer supported on Win10
    * [PICARD-1371] - Windows installer does not warn when installing on 32 bit system
    * [PICARD-1373] - Source distributions are unusable
    * [PICARD-1374] - Picard crashes while typing a regular expression in some cases
    * [PICARD-1375] - Metadata sanitation before move-script execution fails
    * [PICARD-1376] - Error saving Ape files with tag marked for deletion that does not exist
    * [PICARD-1381] - Test results depend on execution order of tests
    * [PICARD-1397] - Do not save tags marked as unsupported
    * [PICARD-1398] - Snap package is missing locale files
    * [PICARD-1405] - Pasting formatted text into scripting window shows formatting
    * [PICARD-1410] - Loading Vorbis file with invalid rating value fails
    * [PICARD-1412] - Deleting tag counts not as important metadata change
    * [PICARD-1414] - Image errors lead to crash in info dialog
    * [PICARD-1415] - Open Containing Folder and Open with MusicPlayer does nothing for UNC paths
    * [PICARD-1418] - Display localized default dialogs and keyboard shortcut hints
    * [PICARD-1420] - Can not save wma file. TypeError: sequence item 0
    * [PICARD-1428] - Removing tags which are only in original file metadata not possible
    * [PICARD-1430] - "Authentication required" dialog does not trigger authentication
    * [PICARD-1431] - Some ID3 frames gets deleted even if the corresponding tags are shown as unchanged
    * [PICARD-1434] - Tag acoustid_id can not be removed or deleted in script
    * [PICARD-1436] - Text extraction of "title" and "label" for translation.
    * [PICARD-1437] - After reload file is being shown as changed
    * [PICARD-1438] - Message box buttons Yes/No aren't translated
    * [PICARD-1439] - Newline character in cover art naming script causes exception on saving

** New Feature
    * [PICARD-490] - Allow tagging AAC/ADTS files with APEv2 tags
    * [PICARD-1043] - Support reading & writing iTunes Classical tags
    * [PICARD-1045] - Check for new version
    * [PICARD-1268] - Support concertmaster recording relationships as performer:concertmaster
    * [PICARD-1273] - Add an option to exclude new cover art type "Raw / Unedited"
    * [PICARD-1319] - Provide cover art metadata to cover image naming script
    * [PICARD-1344] - Add $delete function
    * [PICARD-1352] - Add a command-line option to skip plugin loading
    * [PICARD-1354] - Allow using vocals and instruments as credited
    * [PICARD-1367] - Allow opening searches in browser when using search dialogs
    * [PICARD-1384] - Add AppStream data
    * [PICARD-1386] - Add $title function
    * [PICARD-1395] - Support genres from MusicBrainz
    * [PICARD-1440] - Support loading and renaming Standard MIDI Files (SMF)

** Task
    * [PICARD-1333] - Run CI tests agaist oldest supported mutagen
    * [PICARD-1347] - Refactor script.py to avoid code duplication
    * [PICARD-1365] - Allow building with PyQt 5.11 or later
    * [PICARD-1442] - Support new Audio Play secondary type

** Sub-task
    * [PICARD-1407] - Save originalalbum / originalartist to ASF/WMA
    * [PICARD-1408] - Save originalalbum / originalartist to APE

** Improvement
    * [PICARD-664] - When dragging a recording, show the actual file name instead of the path
    * [PICARD-792] - Package a start menu tile for Windows 10 on the windows version
    * [PICARD-1039] - Use forward delete instead of delete button on macOS
    * [PICARD-1049] - Picard should use TXXX:WORK rather than TXXX:Work
    * [PICARD-1068] - Picard should use MP4 ©wrk for Work rather than generic text field
    * [PICARD-1244] - Refresh list of plugins after uninstalling or installing a local plugin
    * [PICARD-1285] - There is no Close menu item in Picard 2.0 on macOS
    * [PICARD-1313] - Refactor plugin UI
    * [PICARD-1325] - Allow disabling new version update checking for packagers
    * [PICARD-1338] - Picard should be more resilient if it gets invalid responses from servers
    * [PICARD-1358] - Use macOS style widgets in the user interface of the macOS version of Picard
    * [PICARD-1363] - AcoustId submission for matched files is impossible when musicbrainz_recordingid is unset
    * [PICARD-1366] - Show Python version in about
    * [PICARD-1379] - Port astrcmp to new Python C Unicode API
    * [PICARD-1383] - Use MCN / barcode read from disc to improve DiscId lookup
    * [PICARD-1393] - Change the application ID
    * [PICARD-1416] - Should store ID3 Artists field as TXXX:ARTISTS not TXXX:Artists 
    * [PICARD-1417] - Only show plugins with compatible API version
    * [PICARD-1424] - Translate AppStream data
    * [PICARD-1425] - Support all movement tags for APE, Vorbis and MP3
    * [PICARD-1426] - Map musicbrainz_originalalbumid and musicbrainz_originalartistid to MP4 and WMA
    * [PICARD-1443] - Sort secondary release types in UI alphabetically

Comment 8 Gerald Cox 2019-01-21 12:23:27 UTC
(In reply to hugotrip from comment #6)
> Thank you for this try.
> using updates-testing, I updated picard to 2.1.0-1.fc29.x86_64, but I still
> got the same error ModuleNotFoundError: No module named 'PyQt5.sip'
> the only difference in the error message is the line where the call to the
> PyQt5 module is done in /usr/lib64/python3.7/site-packages/picard/tagger.py
> 
...

I don't believe this really has anything to do with picard - but rather your particular system, especially since 
Justin wasn't able to reproduce - and I can't either.

I'm assuming your system is up-to-date, but let's check a few things:

rpm -qa | grep pyqt

my system reports:
python2-pyqt5-sip-4.19.13-3.fc29.x86_64
python3-pyqt5-sip-4.19.13-3.fc29.x86_64


what does your system show?

Comment 9 hugotrip 2019-01-21 21:52:08 UTC
My system reports the same as you to the command
rpm -qa | grep pyqt

So I tried to uninstall python3-pyqt5-sip-4.19.13-3.fc29.x86_64 gave me a list of dependent packages: I tried some and none of them worked, giving me the same error.

Then I went through all the places looked after by python3, and I found another install of PyQt5-5.11.3 on folder /usr/local/lib64/python3.7/site-packages.
it is reviewed by python before /usr/lib64/python3.7/site-packages, and it don't have sip in it : renaming it allowed me to launch picard and everything else.
So the problem is solved, and I apologize for the time wasted.


Apparently I can set status to CLOSED, but I'm not sure I'm allowed to, so I'll wait for one of you to tell me

Comment 10 Gerald Cox 2019-01-22 14:09:06 UTC
No worries.  I'm assuming that you've always used DNF or package updater for your updates... if that is the case, you may want to 
clean it up by renaming back to the original name, do a DNF remove to get rid of the extraneous packages and then re-install to 
make sure you have the correct things going forward and the DNF database is accurate.

Don't close this report, once the upgrade finishes that process will close it out.

Comment 11 hugotrip 2019-01-22 20:49:32 UTC
Ok 
Thanks to both of you

Comment 12 Fedora Update System 2019-01-24 04:31:03 UTC
picard-2.1.0-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2019-01-29 03:00:34 UTC
picard-2.1.0-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.