Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] snap: 2.3.10 fails to start #134

Closed
poschi3 opened this issue Aug 18, 2024 · 5 comments
Closed

[BUG] snap: 2.3.10 fails to start #134

poschi3 opened this issue Aug 18, 2024 · 5 comments
Labels

Comments

@poschi3
Copy link

poschi3 commented Aug 18, 2024

Describe the bug
I updated to version 2.3.10 (snap) and indicator-sound-switcher is not starting anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Open console
  2. Enter "indicator-sound-switcher"
  3. See error

Expected behavior
Indicator is in top bar

Console output

$ indicator-sound-switcher 
Traceback (most recent call last):
  File "/snap/indicator-sound-switcher/150/bin/indicator-sound-switcher", line 33, in <module>
    sys.exit(load_entry_point('indicator-sound-switcher==2.3.10', 'console_scripts', 'indicator-sound-switcher')())
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 479, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2861, in load_entry_point
    return ep.load()
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2465, in load
    return self.resolve()
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2471, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/indicator_sound_switcher/__init__.py", line 32, in <module>
    from .indicator import SoundSwitcherIndicator, APP_ID, APP_NAME, APP_VERSION
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/indicator_sound_switcher/indicator.py", line 4, in <module>
    from importlib.metadata import version
ModuleNotFoundError: No module named 'importlib.metadata'

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.4 LTS
  • Desktop environment GNOME 42.9 Wayland
  • Sound Switcher Indicator version 2.3.10
  • Installation source: snap

Indicator config:
I have no ~/.config/indicator-sound-switcher.json or ~/snap/indicator-sound-switcher/current/.config/indicator-sound-switcher.json (folder ~/snap/indicator-sound-switcher/current/.config exists)

Indicator log:

$ indicator-sound-switcher -vv
Traceback (most recent call last):
  File "/snap/indicator-sound-switcher/150/bin/indicator-sound-switcher", line 33, in <module>
    sys.exit(load_entry_point('indicator-sound-switcher==2.3.10', 'console_scripts', 'indicator-sound-switcher')())
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 479, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2861, in load_entry_point
    return ep.load()
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2465, in load
    return self.resolve()
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2471, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/indicator_sound_switcher/__init__.py", line 32, in <module>
    from .indicator import SoundSwitcherIndicator, APP_ID, APP_NAME, APP_VERSION
  File "/snap/indicator-sound-switcher/150/lib/python3.6/site-packages/indicator_sound_switcher/indicator.py", line 4, in <module>
    from importlib.metadata import version
ModuleNotFoundError: No module named 'importlib.metadata'

Additional context
Add any other context about the problem here.

@poschi3 poschi3 added the bug label Aug 18, 2024
@poschi3
Copy link
Author

poschi3 commented Aug 18, 2024

I found out that importlib.metadata was introduced in Python 3.8 and is no longer provisional from 3.10.

I found out, that python in snap environment is to old:

poschi@bart-nb:~$ snap run --shell indicator-sound-switcher
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

poschi@bart-nb:/home/poschi$ python3 --version
Python 3.6.9

From snapcraft.yaml I can see that the package is based on core18


which means Ubuntu 18.04 LTS (Bionic Beaver).

May be it is possible to update core version?

@piktor
Copy link

piktor commented Aug 19, 2024

I have the same issue on 22.04.4 with snap package so I decided to remove snap and install indicator-sound-switcher from PPA.

$ snap remove indicator-sound-switcher

$ sudo apt-add-repository ppa:yktooo/ppa
$ sudo apt-get update
$ sudo apt-get install indicator-sound-switcher

It works fine as my Python version is 3.10.12

$ python3 --version
Python 3.10.12

You may consider this as workaround :-)

@yktoo
Copy link
Owner

yktoo commented Aug 19, 2024

Yes I'm aware of the problem and looking for a solution. Unfortunately, switching base in a snap is a hassle (mildly put), because the differences between different bases are huge and poorly documented.

@yktoo yktoo changed the title [BUG] ModuleNotFoundError: No module named 'importlib.metadata' [BUG] snap: 2.3.10 fails to start Aug 19, 2024
yktoo added a commit that referenced this issue Aug 20, 2024
yktoo added a commit that referenced this issue Aug 20, 2024
yktoo added a commit that referenced this issue Aug 20, 2024
@yktoo
Copy link
Owner

yktoo commented Aug 20, 2024

Resolved and released in 2.3.10.1.

@yktoo yktoo closed this as completed Aug 20, 2024
@poschi3
Copy link
Author

poschi3 commented Aug 21, 2024

Thank you! It is working fine now :-)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants