yktoo / indicator-sound-switcher

Sound input/output selector indicator for Linux
https://yktoo.com/en/software/sound-switcher-indicator/
GNU General Public License v3.0
367 stars 29 forks source link

Issues on Kubuntu 19.04, installed from ppa #74

Closed othbert closed 5 years ago

othbert commented 5 years ago

Have been happily using since forever on previous releases of ubuntu and kubuntu including 18.04 and 18.10 that were installed on this current system. Upgraded to 19.04 and the ppa was removed, along with some others.

The app stopped working for me and I didn't think much of it for a while, but desperate for it again now and attempting to run gives:

Traceback (most recent call last):
  File "/usr/local/bin/indicator-sound-switcher", line 44, in <module>
    from indicator_sound_switcher.config import Config, EMPTY_CONFIG
ImportError: cannot import name 'EMPTY_CONFIG' from 'indicator_sound_switcher.config' (/usr/lib/python3/dist-packages/indicator_sound_switcher/config.py)

Have uninstalled, readded the ppa, re-installed etc. all to no avail. Same error. Any ideas?

Thanks!

yktoo commented 5 years ago

Please have a look at #67, perhaps something similar happened.

othbert commented 5 years ago

Hi, Thanks, yeah, I thought those comments looked similar so I tried the steps there before I opened this issue.

My results:

$ ls -l /usr/lib/python3/dist-packages/indicator_sound_switcher/

-rw-r--r-- 1 root root   4841 Nov  3  2018 card.py
-rw-r--r-- 1 root root   3689 Nov  3  2018 config.py
-rw-r--r-- 1 root root  48677 Nov  3  2018 indicator.py
-rw-r--r-- 1 root root      0 Oct  5  2016 __init__.py
-rw-r--r-- 1 root root 121740 Oct  5  2016 lib_pulseaudio.py
-rw-r--r-- 1 root root   4490 Nov  3  2018 port.py
-rw-r--r-- 1 root root  24662 Nov  3  2018 prefs.glade
-rw-r--r-- 1 root root  13834 Nov  3  2018 prefs.py
drwxr-xr-x 2 root root   4096 Jun  5 14:44 __pycache__
-rw-r--r-- 1 root root   1764 Nov  3  2018 stream.py
-rw-r--r-- 1 root root    968 Nov  3  2018 utils.py
$ python3 -c 'import sys; print(sys.path)'

['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/othbert/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages']
$ python3 -c 'import indicator_sound_switcher'

Gives no output

$ sudo apt remove indicator-sound-switcher
...
$ ls /usr/lib/python3/dist-packages/indicator_sound_switcher

ls: cannot access '/usr/lib/python3/dist-packages/indicator_sound_switcher': No such file or directory

$ sudo apt update
$ sudo apt install indicator-sound-switcher
...
$ indicator-sound-switcher 
Traceback (most recent call last):
  File "/usr/local/bin/indicator-sound-switcher", line 44, in <module>
    from indicator_sound_switcher.config import Config, EMPTY_CONFIG
ImportError: cannot import name 'EMPTY_CONFIG' from 'indicator_sound_switcher.config' (/usr/lib/python3/dist-packages/indicator_sound_switcher/config.py)
yktoo commented 5 years ago

Looks like you are using a wrong, outdated indicator program from /usr/local/bin (which takes precedence over /usr/bin). Here's what it's supposed to be:

$ which indicator-sound-switcher 
/usr/bin/indicator-sound-switcher

If you also have /usr/bin/indicator-sound-switcher (that's expected), then just remove the culprit:

sudo rm /usr/local/bin/indicator-sound-switcher
othbert commented 5 years ago

Awesome! Thank you, that got it :)