Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundConverter has stopped working #6

Closed
terzag opened this issue Jan 4, 2022 · 10 comments
Closed

SoundConverter has stopped working #6

terzag opened this issue Jan 4, 2022 · 10 comments

Comments

@terzag
Copy link

terzag commented Jan 4, 2022

Haven't used SC in a while, so I'm not sure when it stopped working but when I try to run it I get the following errors:

Traceback (most recent call last):
  File "/app/bin/soundconverter", line 36, in <module>
    VERSION = pkg_resources.require('soundconverter')[0].version
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'soundconverter' distribution was not found and is required by the application

Might be related to an update to the GNOME runtime? I think I got one yesterday or so.

@jmaibaum
Copy link
Collaborator

jmaibaum commented Jan 6, 2022

Thanks for your report. So far, I have no clue why it's not found, as soundconverter still builds and installs normally using flatpak-builder, yet for some reason, pkg_resources.require() (or similar) doesn't find it anymore. I am thus still looking for a proper solution.

In the meantime, I found that setting explicitly setting PYTHONPATH to /app/lib/python3.9/site-packages makes the application launch again. Does this help for you as well?

flatpak run --env=PYTHONPATH=/app/lib/python3.9/site-packages org.soundconverter.SoundConverter

I have no idea why this makes a difference, since /app/lib/python3.9/site-packages is already in sys.path. If it works for you as well though, I might add this as a permanent workaround until someone with more insight into setuptools/pkg_resources can tell me what is going on here.

@jmaibaum
Copy link
Collaborator

jmaibaum commented Jan 6, 2022

FWIW, I have reported this upstream. Maybe someone from the project developers knows what's going on, see: https://bugs.launchpad.net/soundconverter/+bug/1956623

jmaibaum added a commit to jmaibaum/org.soundconverter.SoundConverter that referenced this issue Jan 6, 2022
This should not be necessary, but until someone can tell me what is
going on here, at least this starts soundconverter again.

See flathub#6
@jmaibaum
Copy link
Collaborator

jmaibaum commented Jan 6, 2022

@terzag , if you have time, please check if the test build from #7 (which sets PYTHONPATH by default) installs and launches for you?

@sezanzeb
Copy link

sezanzeb commented Jan 6, 2022

I have installed soundconverter using flatpak, where are the python files that flatpak uses to run soundconverter so that I can try to find a solution? /app/lib/ doesn't exist

@sezanzeb
Copy link

sezanzeb commented Jan 6, 2022

nevermind, found them in /var/lib/flatpak/app/org.soundconverter.SoundConverter/.

PR: kassoulet/soundconverter#60

@terzag
Copy link
Author

terzag commented Jan 6, 2022

When trying the original version with the env option set, it starts but I get the following, not sure if it's normal?

ERROR: Disabling mp3-id-tags output. Do you have "gst-plugins-good" installed?
ERROR: Disabling mp3-vbr-tags output. Do you have "gst-plugins-ugly" installed?
soundconverter 4.0.3

I don't think I've run SC in flatpak through a terminal before, so the errors about tags might have always been there.

As for the test build, I'm not used much to flatpak: do I have to uninstall the original version (from FlatHub) first or update it with that build?

@sezanzeb
Copy link

sezanzeb commented Jan 6, 2022

Usually this is available in package managers:

➜  ~ pacman -Ss gst-plugins-good
extra/gst-plugins-good 1.18.5-2 [installed]
    Multimedia graph framework - good plugins

I don't know how this translates to flatpak

@terzag
Copy link
Author

terzag commented Jan 6, 2022

I'm on Ubuntu and have the various gstreamer plugins packages installed (base, bad, good, ugly) from the repos but I guess flatpak can't use them, I would assume that SC is looking for them either in the package or from an independent one (or a runtime).

@jmaibaum
Copy link
Collaborator

jmaibaum commented Jan 7, 2022

@terzag :

As for the test build, I'm not used much to flatpak: do I have to uninstall the original version (from FlatHub) first or update it with that build?

If you have installed the main version on your system flatpak installation, you can install the test version alongside in your user installation. The command shown by flathubbot is meant for this scenario: The --user switch moves it to the user installation.

Given that you were able to launch the app via the --env on the commandline means that the test version will likely also work, so you don't have to bother.

@jmaibaum
Copy link
Collaborator

jmaibaum commented Jan 7, 2022

When trying the original version with the env option set, it starts but I get the following, not sure if it's normal?

ERROR: Disabling mp3-vbr-tags output. Do you have "gst-plugins-ugly" installed?
soundconverter 4.0.3```

It's is unrelated to this issue, and related to how GStreamer plugins are managed within flatpak runtimes (which I do not fully wrap my head around to be honest). These errors are present since I started working on the flatpak version of soundconverter and just never got around fixing. I didn't find these errors to cause any trouble though. Exporting to MP3 still works, and I cannot remember losing a single ID3 tag or having trouble playing back VBR MP3 generated by soundconverter. I have to admit though that I don't use MP3 extensively anymore, so it might still cause issues. I was always planning to look into this more seriously if somebody came up with an example file/configuration that does not work. So if you find something not working correctly, please file an issue.

You cannot fix these errors installing GStreamer plugins though on your host, they are completely separate from your flatpak platform/runtime.

jmaibaum added a commit that referenced this issue Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants