dpitkevics
dpitkevics

Reputation: 1258

PySide Phonon error that backend plugin could not be loaded

I am developing an app using PySide GUI framework, Python 2.7 on Windows 7/Windows 8 64-bit (PySide and Python both are 32-bit).
I have made a widget that is using Phonon package for video player. At first I tried to run program on Windows 7 - successfully. But, with all the same packages installed, I cannot run it on Windows 8.
Error I receive, when I open Video player or try to switch video is:

WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: Phonon::createPath: Cannot connect  MediaObject ( no objectName ) to  AudioOutput ( no objectName ). 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 
WARNING: Phonon::createPath: Cannot connect  MediaObject ( no objectName ) to  VideoWidget ( no objectName ). 
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded 

PySide plugin dir has all the necessary plugins. Directory C:\Python27\Lib\site-packages\PySide\plugins\phonon_backend content is:

I have tried installing package from setup.py using this option:

data_files=[
    ('phonon_backend', [
        'C:\Python27\Lib\site-packages\PySide\plugins\phonon_backend\phonon_ds94.dll'
    ])
]

Source could be seen here: https://github.com/dpitkevics/stream-ies/blob/master/widgets/video_player.py#L17

And now im at the dead-end. I have no ideas where to search further. And the weirdest thing is that on other PC the same package is working like a charm.
Any help will be appreciated.

Upvotes: 1

Views: 978

Answers (1)

Dayo
Dayo

Reputation: 316

I had the same issue and despite figuring out I had both phonon_ds9d4.dll and phonon_ds94.dll in PySide\plugins\phonon_backend, I also encountered the same WARNING. Thanks to https://srinikom.github.io/pyside-docs/PySide/QtCore/QCoreApplication.html?highlight=librarypaths#PySide.QtCore.PySide.QtCore.QCoreApplication.libraryPaths, I discovered that my path pointed to PyQt i.e C:/Python34/Lib/site-packages/PyQt5/plugins instead of PySide. By removing PyQt5 (which I was not using anyway), it resolved my problem and some more...

My entry point looks like this

if __name__ == '__main__':
    app = QApplication(sys.argv)

    for lppath in app.libraryPaths():
        print(lppath)
    tologin = LoginWidget()
    ret = app.exec_()
    sys.exit(ret)

The for loop returns the paths where PySide is searching for plugins.

Upvotes: 1

Related Questions