rafaelmardojai / blanket

Listen to different sounds
GNU General Public License v3.0
1.39k stars 103 forks source link

Message "PyGIWarning: GstPlay was imported without specifying a version first." #325

Closed Ricky-Tigg closed 10 months ago

Ricky-Tigg commented 10 months ago

v.: 0.6.0. WS: Wayland. OS: Fedora

$ dnf rq --installed --qf '%{name} v. %{version}' \
gnome-shell gstreamer1 python3 flatpak | column
flatpak v. 1.15.6   gstreamer1 v. 1.22.8
gnome-shell v. 45.3 python3 v. 3.12.1

Hello. Pleasant application; operational as Flatpak. However at start, what follows is reported:

$ flatpak run com.rafaelmardojai.Blanket
/app/share/blanket/blanket/sound.py:6: PyGIWarning: GstPlay was imported without specifying a version first. Use gi.require_version('GstPlay', '1.0') before import to ensure that the right version gets loaded.
 from gi.repository.GstPlay import Play as GStreamerPlay

I am not qualified to determine on which side the cause of this message sits; Python, Gstreamer or this application.

rafaelmardojai commented 10 months ago

It is a known warning, not really important and is already fixed on master.

It is because 0.6.0 uses GstPlay (introduced in Gstreamer 1.20) and GstPlayer as fallback for older Gstreamer versions, so we couldn’t "hard require" it.