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

ubuntu 18.10 cannot open v2.2.0 version #67

Closed zyf0330 closed 5 years ago

zyf0330 commented 5 years ago

I install it by apt method. It gives error

Traceback (most recent call last):
  File "/usr/bin/indicator-sound-switcher", line 29, in <module>
    from indicator_sound_switcher.indicator import SoundSwitcherIndicator, APP_ID
ModuleNotFoundError: No module named 'indicator_sound_switcher.indicator'
yktoo commented 5 years ago

That is weird. Can you do:

ls -l /usr/lib/python3/dist-packages/indicator_sound_switcher/
zyf0330 commented 5 years ago
-rw-r--r-- 1 root root   4841 Nov  3 17:34 card.py
-rw-r--r-- 1 root root   3689 Nov  3 17:34 config.py
-rw-r--r-- 1 root root  48677 Nov  3 17:34 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 17:34 port.py
-rw-r--r-- 1 root root  24662 Nov  3 17:34 prefs.glade
-rw-r--r-- 1 root root  13834 Nov  3 17:34 prefs.py
drwxr-xr-x 2 root root   4096 Jan 18 11:41 __pycache__
-rw-r--r-- 1 root root   1764 Nov  3 17:34 stream.py
-rw-r--r-- 1 root root    968 Nov  3 17:34 utils.py

This is results

yktoo commented 5 years ago

And if you run:

python3 -c 'import sys; print(sys.path)'

What does it show?

Then also try:

python3 -c 'import indicator_sound_switcher'
zyf0330 commented 5 years ago

First shows

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/zyf/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/home/zyf/app/onedrived-dev', '/usr/lib/python3/dist-packages']

Second shows nothing and exitcode is 0.

yktoo commented 5 years ago

This is entirely correct and expected. And it means Python can perfectly import the indicator_sound_switcher library. So I have no clue what goes wrong there. I can only suggest completely removing (make sure that /usr/lib/python3/dist-packages/indicator_sound_switcher doesn't exist) and reinstalling the app.

zyf0330 commented 5 years ago

It seems good now.