Siduction Forum
Siduction Forum => Upgrade Warnings => Topic started by: mdmarmer on 2025/01/11, 14:08:28
-
Streamtuner2 not working after python3 upgrade -- streamtuner2 fails with error No module named 'pipes' and I believe the pipes module is removed in python3 version 3.13:
https://github.com/jupyter/nbclassic/issues/308
-
Here the same. I’d tried to find any help out there but could not find anything about this python piping issue corresponding to streamtuner2. Hope it will be fixed intime.
-
There has not been much activity in development for streamtuner - v2.2.2 has been published 2 years ago, so do not expect any fix soon.
But you can run the downloaded sourceforge/fossil package https://fossil.include-once.org/streamtuner2/index (https://fossil.include-once.org/streamtuner2/index) in a python 3.12 environment.
(There are still other packages not being updated to work with python 3.13: virtualbox, xpra, hplip, python3-fitz...)
-
I've been seeing python errors in the logs for some time now. It seems to be a bit of a moving target. Python3-uno was on the remove list for a few days due to package mismatch. All cleared now but Streamtuner has certainly been in the logs for at least several weeks now.
-
The Python 3.13 upgrade breaks a number of packages including hplip which I use for managing my HP printer. Seems 3.13 brings about some major changes.
-
I agree, the Python 3.13 upgrade has definitely caused issues with several packages, including Streamtuner2, due to the removal of the `pipes` module. It's frustrating when things break unexpectedly after an update, especially when there's limited support or information on how to fix it. Hopefully, developers will address this soon, as it's affecting multiple packages like hplip as well.
-
Guess there's no other Python 3 module that replaces the pipes module or one that provides the necessary functionality.
-
More info about pipes and other removed modules in python 3.13 can be read here https://peps.python.org/pep-0594/ (https://peps.python.org/pep-0594/)
-
Guess there's no other Python 3 module that replaces the pipes module or one that provides the necessary functionality.
As mentioned in the link posted by mdmarmer, pipes can be replaced with shlex.
pipes only apears in two places in files action.py and st2subprocess.py:
diff -Nru streamtuner2/action.py streamtuner2_py313/action.py
--- streamtuner2/action.py 2018-12-31 12:14:17.000000000 +0100
+++ streamtuner2_py313/action.py 2025-01-15 09:08:21.289321876 +0100
@@ -37,7 +37,7 @@
import platform
import copy
import json
-import subprocess, pipes
+import subprocess, shlex
from datetime import datetime
from xml.sax.saxutils import escape as xmlentities, unescape as xmlunescape
@@ -206,7 +206,7 @@
if re.match("^\w[\w.:/\-]+$", ins):
return ins
else:
- return pipes.quote(ins)
+ return shlex.quote(ins)
#return "%r" % ins
diff -Nru streamtuner2/contrib/st2subprocess.py streamtuner2_py313/contrib/st2subprocess.py
--- streamtuner2/contrib/st2subprocess.py 2017-10-17 00:23:14.000000000 +0200
+++ streamtuner2_py313/contrib/st2subprocess.py 2025-01-15 09:08:43.537435156 +0100
@@ -50,7 +50,6 @@
import subprocess
import os
import shlex
-import pipes
import re
from config import *
from channels import FeaturePlugin
@@ -100,7 +99,7 @@
if conf.cmd_spawn in ("system", "default", "win32api") or type(ins) is list:
return orig_quote(ins)
# only Posix-style shell quoting
- return pipes.quote(ins)
+ return shlex.quote(ins)
# override for action.run (os.system exec method)
-
Guess there's no other Python 3 module that replaces the pipes module or one that provides the necessary functionality.
As mentioned in the link posted by mdmarmer, pipes can be replaced with shlex.
pipes only apears in two places in files action.py and st2subprocess.py:
diff -Nru streamtuner2/action.py streamtuner2_py313/action.py
--- streamtuner2/action.py 2018-12-31 12:14:17.000000000 +0100
+++ streamtuner2_py313/action.py 2025-01-15 09:08:21.289321876 +0100
@@ -37,7 +37,7 @@
import platform
import copy
import json
-import subprocess, pipes
+import subprocess, shlex
from datetime import datetime
from xml.sax.saxutils import escape as xmlentities, unescape as xmlunescape
@@ -206,7 +206,7 @@
if re.match("^\w[\w.:/\-]+$", ins):
return ins
else:
- return pipes.quote(ins)
+ return shlex.quote(ins)
#return "%r" % ins
diff -Nru streamtuner2/contrib/st2subprocess.py streamtuner2_py313/contrib/st2subprocess.py
--- streamtuner2/contrib/st2subprocess.py 2017-10-17 00:23:14.000000000 +0200
+++ streamtuner2_py313/contrib/st2subprocess.py 2025-01-15 09:08:43.537435156 +0100
@@ -50,7 +50,6 @@
import subprocess
import os
import shlex
-import pipes
import re
from config import *
from channels import FeaturePlugin
@@ -100,7 +99,7 @@
if conf.cmd_spawn in ("system", "default", "win32api") or type(ins) is list:
return orig_quote(ins)
# only Posix-style shell quoting
- return pipes.quote(ins)
+ return shlex.quote(ins)
# override for action.run (os.system exec method)
Nice find and does Streamtuner2 work with that change? Was also wondering if the arguments to shlex the same as for pipes and if so that should be a quick little hack to get ST2 working again considering pipes was used in just 2 places in the code.
-
I've just booted the last Siduction ISO "shine on" on my laptop and installed streamtuner2 on it and it's running nicely with the following Python packages which have been installed during the installation process:
python3-pyquery, python3-webob
I do not know what will happen if I upgrade this Version when it is installed and if it is neccesary to stat this python3 plugs on hold?
My mistake: it is running 'cause it's still Python3 3.12.7-1 and not the upgraded 3.13.1-2. Sorry !!
As expeced: after upgrading to 3.13.1-2 still the same issue.
Dos it make sence to put Python3 on hold or how do I implement the changes into Python3 as xerol told to.
And again: this ISO / distri everytime is lovely. Thanks to all the people who are involved!!
-
As expeced: after upgrading to 3.13.1-2 still the same issue.
Dos it make sence to put Python3 on hold or how do I implement the changes into Python3 as xerol told to.
No. You may put it on hold termporarly, but in the long run putting python3 on hold will break many packages which are essential for the system.
As mentioned above, you should download the the sources, create a python3.12 environment and run it from there.
As an alternative, this command is an ugly quick fix:
sudo sed -i "s/pipes/shlex/" /usr/share/streamtuner2/action.py
As I am distributing syncronized audio streams in my house with mopidy/snapcast, I do not use streamtuner2. I just did a short test run.
-
thx xerol
Sttreamtuner is working again with your advice.
Are you using mopidy/snapcast just for listening or are you providing streams?
I like streamtuner2 because it is very easy to listen and search audio-streams all over the world on different platforms.
Thanks a lot for your hint and stay tuned ;-)
-
thx xerol
Sttreamtuner is working again with your advice.
Are you using mopidy/snapcast just for listening or are you providing streams?
I like streamtuner2 because it is very easy to listen and search audio-streams all over the world on different platforms.
Thanks a lot for your hint and stay tuned ;-)
I’m also curious about Mopidy/Snapcast. Are you using it just for personal listening, or are you setting up your own streaming server?
-
I’m also curious about Mopidy/Snapcast. Are you using it just for personal listening, or are you setting up your own streaming server?
I have configured 3 mopidy instances on my server for local (in my house) streaming of various music. Each room runs a snapcast client to play one of the streams (perfectly in sync). Mostly all clients play the same stream, but a user may select for one/some receivers a different stream.
Mopidy playlists consist of local (on the server) saved audio files or radio stream URLs and provides this to snapserver for synced distribution. But I can also reroute the audio output from my desktop audio player to snapserver for distribution in the house.
Snapcast client may run on a lot of different device types (Linux/Raspi, Android, Windows, OpenWRT). I bought three cheap (10€) TP-Link WR-710N, installed OpenWRT with snapclient and added a USB soundcard.
Details may be found in the github repo of snapcast https://github.com/badaix/snapcast (https://github.com/badaix/snapcast)
(further discussions should probably moved away from 'Upgrade Warnings' channel to 'Free Speech'?)