Endless issues with Picard on Linux Mint 21.3 Cinnamon

Hi, I can’t seem to get Picard to work properly on Linux Mint 21.3 Cinnamon. Cinnamon version is 6.0.4, linux kernel 5.15.0-101-generic

I tried installing it via Flatpak—application opens, but drag and drop doesn’t work. I get the following error on every song I try to drag in:

E: 16:10:40,019 util/thread.run:69: Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/mutagen/_util.py", line 251, in _openfile
    fileobj = open(filename, "rb+" if writable else "rb")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: b'/media/damiano/MEMEBOX5000/Music/FLAC/All Time Low/Future Hearts (Deluxe Edition)/01 All Time Low - Satellite.flac'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/picard/util/thread.py", line 66, in run
    result = self.func()
             ^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/picard/file.py", line 240, in _load_check
    return self._load(filename)
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/picard/formats/vorbis.py", line 136, in _load
    file = self._File(encode_filename(filename))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/mutagen/_file.py", line 48, in __init__
    self.load(*args, **kwargs)
  File "/app/lib/python3.11/site-packages/mutagen/_util.py", line 185, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/mutagen/_util.py", line 154, in wrapper
    with _openfile(self, filething, filename, fileobj,
  File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/mutagen/_util.py", line 272, in _openfile
    raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: b'/media/damiano/MEMEBOX5000/Music/FLAC/All Time Low/Future Hearts (Deluxe Edition)/01 All Time Low - Satellite.flac'

E: 16:10:40,020 ui/item.error_append:108: <FLACFile '01 All Time Low - Satellite.flac'>: The file failed to parse, either the file is damaged or has an unsupported file format.
E: 16:10:40,020 ui/item.error_append:108: <FLACFile '01 All Time Low - Satellite.flac'>: [Errno 2] No such file or directory: b'/media/damiano/MEMEBOX5000/Music/FLAC/All Time Low/Future Hearts (Deluxe Edition)/01 All Time Low - Satellite.flac'
E: 16:10:40,020 file._loading_finished:258: Guessing format of /media/damiano/MEMEBOX5000/Music/FLAC/All Time Low/Future Hearts (Deluxe Edition)/01 All Time Low - Satellite.flac failed
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/picard/file.py", line 256, in _loading_finished
    alternative_file = guess_format(self.filename)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/picard/formats/util.py", line 62, in guess_format
    with open(filename, 'rb', 0) as fileobj:
         ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/media/damiano/MEMEBOX5000/Music/FLAC/All Time Low/Future Hearts (Deluxe Edition)/01 All Time Low - Satellite.flac'

In order to edit anything, I have to click add files/add folder and manually navigate to the files location, which is annoying.

If I install the LM system package version instead, drag and drop works, but scanning files and loading data from the MusicBrainz database with the tagger button doesn’t. I get this error:

E: 16:13:01,931 webservice.ssl_errors:363: SSL error: The peer did not present any certificate
E: 16:13:01,932 webservice._handle_reply:534: Network request error for https://musicbrainz.org/ws/2/release/7f4c7423-49ca-4d09-8dc9-7e5b64237c4c?inc=aliases%2Bannotation%2Bartist-credits%2Bartist-rels%2Bartists%2Bcollections%2Bdiscids%2Bisrcs%2Blabels%2Bmedia%2Brecording-rels%2Brecordings%2Brelease-group-level-rels%2Brelease-groups%2Brelease-rels%2Bseries-rels%2Burl-rels%2Bwork-rels -> SSL handshake failed (QT code 6, HTTP code 0)
E: 16:13:01,932 ui/item.error_append:108: <Album 7f4c7423-49ca-4d09-8dc9-7e5b64237c4c ''>: SSL handshake failed

I tried installing Picard via the PPA and it was the same deal as the LM package, so I just went back to the flatpak version, since I’d rather deal with a non-functional drag-and-drop rather than network errors, and at least the network worked fine in the flatpak version. Unfortunately, ever since trying the PPA, now all of the files I edit get renamed to “.xdp-[trackname].flac-[random letter sequence]” for example, “.xdp-13 All Time Low - Old Scars_Future Hearts.flac-QuIkgu” which it wasn’t doing before. I checked file renaming preferences and nothing seems out of the ordinary, so I don’t know why it’s doing that.

Also, this isn’t exactly high priority, but it is annoying, so: Picard also does not comply with my system theme. It’s fully in light mode despite my theme being dark. It’s eye-searing.

I’ve just about had it. Anyone have any solutions to this?

Welcome to the forums :wave:

Drag and drop in Flatpaks can be a little confusing at first. As this packaging format tries to limit most application’s access to files as a way to mitigate security risks, it’s likely that Picard does not have access to the file’s location. Adding files from a dialog window usually works because they utilize the concept of “portals”, which will allow the operating system to transfer the file into the application.

What you likely want to do is download Flatseal and add “/media/damiano/MEMEBOX5000/Music” as one of the directories that Picard can use (found under the filesystem section). It should looks something like this:

Further reading:

3 Likes

AFAIK Mint 21.3 is based on Ubuntu 22.04 (Jammy, LTS). There is an official Picard PPA at MusicBrainz stable PPA : “MusicBrainz Developers” team which should work out of the box.

That seems to work, thank you!

Weirdly, the naming issue I was having seems to also have resolved on it’s own, or as a result of that, I’m not sure. Either way, it’s working, and that’s what’s important.

If anyone has any suggestions for how to solve the issue with dark mode, that’s the only thing that seems to be troubling me now, but I can probably live without it, it’s just a little ugly.

1 Like

Yes, that’s the PPA version that I mentioned trying in my original post. It doesn’t work, unfortunately. Has the same network issues as the LM system package.

Yes, that was the result of the sandboxing. Flatpack or rather the desktop portal makes files and folder selected via the file pickers available to the application. In case of individual files it provides a copy with that weird naming.

Btw, what you did with Flatseal can also be done via command line if you prefer. To give Picard access to an additional folder you can run:

flatpak override org.musicbrainz.Picard --filesystem=<path_here>

This sounds like some mess with your installed libraries for libssl and Qt5. My guess would be that you have the Qt5 libraries installed from elsewhere and not using the one from your distributions repository. Typical cases for this are having PyQt5 installed via pip / PyPI or using the Anaconda Python distribution to install software.

The Qt5 version shipping with PyQt5 from PyPI.org has been compiled against openssl 1.1, while newer Ubuntu versions (and I assume this then also applies to Mint) no longer provide this.

You should make sure you don’t have any non-system Qt5 installed.

You can also check with picard --long-version the version of Qt5 being used. If the version shown is different from what is installed from the Linux Mint package repositories that would be a clear indication that a different Qt5 installation is present.

4 Likes

Yes, that was the result of the sandboxing. Flatpack or rather the desktop portal makes files and folder selected via the file pickers available to the application. In case of individual files it provides a copy with that weird naming.
Btw, what you did with Flatseal can also be done via command line if you prefer.

I see. Thanks, that’s good to know.

This sounds like some mess with your installed libraries for libssl and Qt5.

That makes sense actually—I’ve been doing a fair bit of programming in python, and I’ve been using mostly Qt6 for building python GUI, but I’ve also used a bit of Qt5 in the past which I installed via pip. Since I use Qt6 more for my GUI builds than Qt5 I don’t really need the pip version now, so I’ll try and get that back to the system version. Thanks for the advice.

1 Like