Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2659

ResourceError with QMediaPlayer Example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.6.3
    • PySide
    • None
    • Windows 11 Home (22621.3155)
      Python Version 3.11.4
      PySide6 Version 6.6.3
    • Windows

    Description

      In order to test the functionality of QMediaPlayer for a personal project, I copied and ran the example code found at https://doc.qt.io/qtforpython-6/examples/example_multimedia_player.html. 

       

      After selecting an AVI file, there was no change in the player. I double-checked, but the selected AVI file does play normally on my computer. I manually added some print statements to see the source of the error, and this is what I got:

      • self._player.source(): a PySide6.QtCore.QUrl object that went to the correct file location
      • self._player.isPlaying(): False
      • self._player.error(): Error.ResourceError
      • self._player.errorString(): Not available
      • self._player.mediaStatus(): MediaStatus.NoMedia

      I also noticed that the self._player.errorOccurred signal didn't seem to fire, as print statements inside the associated slot didn't print to the console. 

      I also did a test with some example code for PyQt6 (code 1 from https://stackoverflow.com/questions/73758160/some-questions-about-qmediaplayer-in-pyqt6). It worked with PyQt6, but when I translated the example over to PySide6, I received the same errors as before (ResourceError and NoMedia). 

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              coneill000 Ciara O'Neill
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes