Python and playbin3 autoaudio issue on Linux - no audio if interpreter is invoked as python3

Hi,

Yesterday I found an interesting issue. I’ve developed a Gtk4 app to manage my collection of family media. I use a Gstreamer playbin3 pipeline to show our videos.

I discovered that audio wasn’t working from the IDE. When I tested from the terminal, audio worked. I tracked this down to the IDE invoking the interpreter as python3 while I invoked it as python from the terminal. If I invoked as python3 from the terminal, audio stopped working. python and python3 are both symlinks to the same python3.11 interpreter.

Where would I start in debugging this - any environment variables to set, or source packages to look at? I want to do more investigation before asking for more help - at least to provide a better question.

The pipeline I create uses playbin3 with gtk4paintable as the video sink. I let playbin3 choose the audio sink.
I’m running on Manjaro and using the python gobject 3.46.0-1 package to wrap Gtk4, Gst, etc.

To repeat - audio is fine with gst-play, gst-launch and when I invoke my app using the interpreter name python.