Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

adding media_player_mpy to OpenSesame

Hi, i've been using the media player successfully in OpenSesame tasks. I've just updated to latest version, and now I don't have the media player (media_player_mpy) plugin. I'm using a Mac.

I've tried to follow the instructions for downloading the plugin again - but I'm not sure where to put things. I downloaded the folder from here: https://github.com/dschreij/opensesame-plugin-mediaplayer

For OSX it says to put the folder in the homefolder under ~/.opensesame/plugins/media_player_mpy

So I think I have this right:

Now I expected OpenSesame to have the plug in, and when I tried running a task to download ffmpeg. But there was no option to add media to my task (and opening an existing task that previously had movies created an error and the media module was removed from the block sequence).

Can anyone point me in the right direction here?

Comments

  • Update: i realised I was missing a 'plugins' folder in that directory. I added the media_player_mpy folder to the newly created plugins folder. And now I have the media player module! However...

    When I add the module to an experiment I get an error (pasted in full below) that seems to be a problem of the mediacoder.

    So I found where to download the mediacoder from githubg:

    But where do I put this (and which files/folders do i need)?


    Full error message I mentioned above:

    Traceback (most recent call last):
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/item_store.py", line 190, in new
        self.experiment.item_prefix()
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/plugins.py", line 447, in load_plugin
        item_module = import_plugin(plugin, _type=_type)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/plugins.py", line 413, in import_plugin
        return imp.load_source(plugin, path)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/imp.py", line 171, in load_source
        module = _load(spec)
      File "<frozen importlib._bootstrap>", line 696, in _load
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/Users/robinlaycock/.opensesame/plugins/media_player_mpy/media_player_mpy.py", line 32, in <module>
        import mediadecoder
    ModuleNotFoundError: No module named 'mediadecoder'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 821, in dropEvent
        self.drop_event_item_new(data, e)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 720, in drop_event_item_new
        item, new_items = self.drop_get_item_snippet(data)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 606, in drop_get_item_snippet
        catch_exceptions=False)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libqtopensesame/misc/qtitem_store.py", line 118, in new
        allow_rename=allow_rename
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/item_store.py", line 195, in new
        exception=e
    libopensesame.exceptions.osexception: 
    Failed to load plugin 'media_player_mpy'
    
    item-stack: 
    time: Sun Mar 13 15:42:19 2022
    exception type: ModuleNotFoundError
    exception message: No module named 'mediadecoder'
    
    Traceback:
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/item_store.py", line 190, in new
        self.experiment.item_prefix()
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/plugins.py", line 447, in load_plugin
        item_module = import_plugin(plugin, _type=_type)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/libopensesame/plugins.py", line 413, in import_plugin
        return imp.load_source(plugin, path)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/imp.py", line 171, in load_source
        module = _load(spec)
      File "<frozen importlib._bootstrap>", line 696, in _load
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/Users/robinlaycock/.opensesame/plugins/media_player_mpy/media_player_mpy.py", line 32, in <module>
        import mediadecoder
    ModuleNotFoundError: No module named 'mediadecoder'
    


  • Hi,

    Try installing the missing package(s). In the case of mediadecoder, https://pypi.org/project/mediadecoder/

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • many thanks for the reply @eduard

    I'm afraid i'm a novice with python. I can't tell which of those to download (source distribution, or one of the two Built Distribution options?).

    I went a head and downloaded Built Distribution for py3. It appears I need to use python to install this?

    Although I found this guide for installing (https://packaging.python.org/en/latest/tutorials/installing-packages/), but I've found it fairly impenetrable. Hoping installing this is not too difficult. My previous version of OpenSesame did not require this.

  • Generally, you can use following procedure.

    1. Identify the missing package based on the error message (Usually the part "ModuleNotFoundError: No module named <MODULENAME>" gives it away
    2. Look online how this package is installed (that will give you a pip install like the one I linked above, in most cases)
    3. Install it directly in Opensesame, via the debug window (see here for guidance). If I am not mistaken, the syntax is simply !pip install MODULENAMEOptionally with a --user flag (in case you don't have root write permissions)

    I hope this helps!

    Eduard

    Buy Me A Coffee

  • ok great, point 3 helped a lot as I had no idea this step was needed. I was actually already working on step 2 but was stuck, but have worked it out. :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games