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

Fix PulseAudio backend not working by updating SoundCard dep #108

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

renyuneyun
Copy link

This should fix #107. Though, I'm not sure if this is the best remote version to use.

This is due to a change in Python 3.10.

The key change needed is to use collections.abs.Iteration rather than collections.Iteration.
The way SoundCard fixes this is correct, but it may not be the best. In theory, it may cause backward-compatibility issues for older Python versions. Though the collections.abc module was introduced in version 3.3, which should only cause problems on really old systems.
If really needed, see this SO answer for a better practice.

@gabeklavans
Copy link

Considering the repo hasn't had a commit in 2 years, and there are basically no other decent audio visualizer plasmoids (that I can find), I may build and install this PR for my desktop if it works for you xd

@qspidy
Copy link

qspidy commented May 30, 2023

As you mentioned "The key change needed is to use collections.abs.Iteration rather than collections.Iteration.", I clone the raw repository rbn42/panon and get submodule as said in README:

git clone https://github.com/rbn42/panon.git
cd panon

# Download SoundCard and hsluv-glsl
git submodule update --init

Then modify ./panon/third_party/SoundCard/soundcard/pulseaudio.py :

...
#The comment part are the lines before modification.
#import collections
import collections.abc
...
#        if isinstance(self.channels, collections.Iterable):
        if isinstance(self.channels, collections.abc.Iterable):
...
#        if isinstance(self.channels, collections.Iterable):
        if isinstance(self.channels, collections.abc.Iterable):
...

Finally build as said in README:

# Build translations (optional)
mkdir build
cd build
cmake ../translations
make install DESTDIR=../plasmoid/contents/locale
cd ..

# To install
kpackagetool5 -t Plasma/Applet --install plasmoid

Done. PulseAudio backend now works for me. Sure there should be a better way to solve the problem, but this is the fastest way.

BTW, my Desktop information:

  • OS: Archlinux
  • Version of Plasma Framework: 5.106.0
  • Python: 3.11.3

Bug is the same as #107

@BBFifield
Copy link

I can confirm that this makes the widget work again on OpenSUSE Tumbleweed

@Oguidan
Copy link

Oguidan commented Aug 5, 2023

what about we create a new repository base of this one and then publish it? If I do will you support me?

@Oguidan
Copy link

Oguidan commented Aug 5, 2023

I have tried, it work also for Ubuntu 23. What do you think about the idea I have given.

@creeloper27
Copy link

I have also tried this and it works on Nobara Linux 37 (Fedora 37 Based), would love for this to get merged and a new release to be made so that the plasmoid store version becomes working again as well @rbn42 :D

@creeloper27
Copy link

creeloper27 commented Aug 29, 2023

@qspidy You do not need to compile and install from source, if you download the latest version from the plasmoid store and then run sed -i 's/collections.Iterable/collections.abc.Iterable/g' ~/.local/share/plasma/plasmoids/panon/contents/scripts/soundcard/*.py to fix the python files it works as well, I think this is quite a lot faster :P

@creeloper27
Copy link

creeloper27 commented Aug 29, 2023

what about we create a new repository base of this one and then publish it? If I do will you support me?

I have just sent an email to Chen-ZZ which is currently beeing followed by rbn42 and asked him if he is able to contact him, we'll see how this goes, it would be nice if we could keep this project here and with the same name.

update: I have also found rbn42's email and sent one to him as well.
update2: I am starting to contact some of the other maintainers as well, I see some have recent activities on github.

@Oguidan
Copy link

Oguidan commented Sep 4, 2023

@creeloper27 good idea

@gabeklavans
Copy link

Any responses? @creeloper27

@creeloper27
Copy link

creeloper27 commented Apr 3, 2024

Any responses? @creeloper27

It's almost been a year and I got back 0 responses unfortunately :/

Meanwhile someone else forked the project and republished with the name panon-fixed, I guess that can be used instead for now.
panon-fixed github repository
panon-fixed KDE Store

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

Successfully merging this pull request may close these issues.

[BUG] Visualization won't show for PulseAudio, due to Python 3.10
6 participants