Unable to use the 'media_player_mpy'
Hello,
We are trying to play a video clip followed by a task on Open Sesame. I have downloaded and tried to use the Visual stimuli button after downloading. But it keeps saying 'an unexpected error occurred':
Failed to load plugin 'media_player_mpy'
Is there anything I did wrong or anything I can do to fix this?

Comments
Hi,
What do you mean exactly by "using the visual stimuli button"?
If you look in the debug window (
Ctrl+D), do you see an error message? If so, could you post that here?Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks for responding! There's a visual stimuli button appeared on the left side (under Toolbar items). I can see the error message. But I read some other discussions in the past about this issue. And I used a Windows system this time and it worked fine now!
Best,
Iris
Hi Iris,
Still it would be great if you could post the error message here so we can maybe fix this for the non-windows systems you were working on earlier. Please let us know more about this.
Hi Daniel,
Of course! Sorry about the late reply.
Error message:
Traceback (most recent call last):
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 753, in dropEvent
self.drop_event_item_new(data, e)
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 672, in drop_event_item_new
item, new_items = self.drop_get_item_snippet(data)
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 560, in drop_get_item_snippet
catch_exceptions=False)
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/misc/qtitem_store.py", line 105, in new
script=script)
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 162, in new
u"Failed to load plugin '%s'" % _type, exception=e)
osexception:
Failed to load plugin 'media_player_vlc'
item-stack: experiment[run].expLoop[run]
exception message: dlopen(libvlc.dylib, 6): image not found
time: Tue Dec 20 16:59:41 2016
exception type: OSError
Traceback:
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 159, in new
self.experiment, script, self.experiment.item_prefix())
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 361, in load_plugin
item_module = import_plugin(plugin, _type=_type)
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 332, in import_plugin
return imp.load_source(plugin, path)
File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/media_player_vlc.py", line 32, in
import vlc
File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/vlc.py", line 168, in
dll, plugin_path = find_lib()
File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/vlc.py", line 160, in find_lib
dll = ctypes.CDLL('libvlc.dylib')
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/ctypes/init.py", line 362, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libvlc.dylib, 6): image not found
Hi Iris,
I see you are using the older media_player_vlc. This is causing quite some troubles with the newer version of OpenSesame and we don't actively maintain it anymore, because many of its issues are regarded as unfixable. Have you tried the media_player_mpy, player that comes packaged with the latest version of OpenSesame?
Hi,
I'm running into similar problems. (Hope it's ok to use this thread even though the error is not identical.) I tried to add a
media_player_mpyitem via GUI. I tried both drag-and drop and the 'insert new item' button and get the following error messages:Failed to load plugin 'media_player_mpy'exception message: Unable to download 'ffmpeg.osx'.I'm using OS version 3.01.06 (expyriment backend) under Mac OS X 10.11.6.
Here's the full error message:
I don't know how to download ffmpeg.osx
Do I do that in the debug window? (-> What is the exact command?) Or should I use the webbrowser? (-> Which site do I get it from and where should I put the file?)
Can anyone help me?
Thanks!
Sophia
Hi Sophia,
maybe this links helps: https://www.ffmpeg.org/download.html
If not you can always try one of the other players: http://osdoc.cogsci.nl/3.1/manual/stimuli/video/
Good luck,
Eduard
Hi Eduard,
Thank you for the link! Do you happen to know where the file has to be saved to? I tried different places in the libopensesame folder but I'm not even sure if I have to insert the folder as a whole or extract the individual files.
Cheers,
Sophia
Nope, not really. Maybe in the same folder as where the plugin is stored? You can try to check all the files in the stack trace of the error message (starting from below), to see whether you can find a path at which Opensesame tries to find it.
Eduard
Hi Eduard,
Thanks for your reply! That's what I had started doing.
Meanwhile, I found these instructions that seem perfectly fit for my problem. Unfortunately, following them doesn't solve the problem, either.
So I guess I'll just go to plan b and try another player.
Thanks again for your hints!
edit: I eat my words. The linked instructions did solve my problem!
(I was just stupid enough to try a newer file version and not the one with exactly the required name.)