Howdy, Stranger!

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

Supported by

Windows error 126: module not found

bwgbwg
edited September 2022 in OpenSesame

I'm trying to run an old experiment created by someone else. I installed the old OpenSesame version (3.0 Interactive Ising), but I get the following error message:

File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\inline_script.py", line 116, in run
   self.workspace._exec(self.crun)
 File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\base_python_workspace.py", line 124, in _exec
   exec(bytecode, self._globals)
 Inline script, line 9, in <module>
 File "C:\Program Files (x86)\OpenSesame\lib\ctypes\__init__.py", line 432, in __getattr__
   dll = self._dlltype(name)
 File "C:\Program Files (x86)\OpenSesame\lib\ctypes\__init__.py", line 362, in __init__
   self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] 

I'm not very familiar with OpenSesame so I'd be very grateful for help with this.

Comments

  • Hi @bwg ,

    This error comes from a Windows library (.dll ) that the experiment fails to load. Presumably, the creator of the experiment installed this library manually and wrote a piece of inline_script that uses it. Can you post the inline_script that triggers the error?

    ­— Sebastiaan

  • bwgbwg
    edited September 2022

    I think this is the inline script:

    from psychopy import core
    from ctypes import windll
    import time
    
    a = time.time()
    timeout = 0.8
    
    port = 61433
    io = windll.dlportio
    
    val = 0
    
    while time.time() < a + timeout:
       val = io.DlPortReadPortUchar(port)
       if val== 200 or val==64:
          break
    
    
    exp.set('response', val)
    
    #get response time
    response_time = time.time()
    resp = (response_time - a) * 1000
    
    exp.set("response_time",resp)
    
    if resp > 799:
       exp.set("response_time",0)
    
    print(val)
    


  • Hi @bwg ,

    This script assumes that you have a file called dlportio.dll , which can be used to communicate through the parallel port. You can download dlportio.dll from many places on the internet, including dll-files.com. However, it seems that only 32 bit versions exist of this driver, which means that it's not compatible with the current 64 bit OpenSesame packages. It may work with the (outdated) 3.0 packages though, so you can try that. To install the dll simply extract it to the OpenSesame program folder.

    -- Sebastiaan

  • Thank you! Unfortunately, I now get a new error message (DLPORTIO.SYS device driver not loaded). Maybe it's because I'm trying to run a script on my laptop that was designed to take external input from a button box.

    I found a version that ran on a desktop PC with keyboard input, but that version also doesn't run. The error is:

    exception message: _allowed_responses not found

    exception type: AttributeError

    The allowed responses in the experiment are set to v;b. I have no idea how to even start trying to fix this.

  • Thank you! Unfortunately, I now get a new error message (DLPORTIO.SYS device driver not loaded). Maybe it's because I'm trying to run a script on my laptop that was designed to take external input from a button box.

    That means that dlportio is not properly installed, presumably because there is an additional file dlportio.sys that is required in addition to the .dll and that is currently missing.

    The allowed responses in the experiment are set to v;b. I have no idea how to even start trying to fix this.

    This sounds like a version-incompatibility, but based on this abbreviated error message it's difficult to say. In the console you can see the full error message. Can you post that here?

  • Sorry for posting too little information. Here's the full error message:

    Stopped

    The experiment did not finish normally for the following reason:

    • Unexpected error

    Details

    • item-stack:experiment[run].Block_Loop[run].BlockSeq[run].Sequence_Loop[run].GameSeq[run].selection_loop[run].selection_seq[prepare].new_keyboard_response[prepare]
    • exception message: _allowed_responses not found
    • time: Thu Sep 15 12:59:12 2022
    • exception type: AttributeError

    Traceback (also in debug window)

      File "dist\libqtopensesame\misc\process.py", line 140, in run
      File "dist\libopensesame\experiment.py", line 390, in run
      File "dist\libopensesame\item_store.py", line 95, in execute
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\sequence.py", line 49, in run
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\loop.py", line 143, in run
      File "dist\libopensesame\item_store.py", line 95, in execute
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\sequence.py", line 49, in run
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\loop.py", line 143, in run
      File "dist\libopensesame\item_store.py", line 95, in execute
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\sequence.py", line 49, in run
      File "dist\libopensesame\item_store.py", line 110, in run
      File "dist\libopensesame\loop.py", line 143, in run
      File "dist\libopensesame\item_store.py", line 94, in execute
      File "dist\libopensesame\item_store.py", line 126, in prepare
      File "dist\libopensesame\sequence.py", line 106, in prepare
      File "dist\libopensesame\item_store.py", line 126, in prepare
      File "dist\libopensesame\keyboard_response.py", line 46, in prepare
      File "dist\libopensesame\generic_response.py", line 312, in prepare
      File "dist\libopensesame\generic_response.py", line 252, in prepare_allowed_responses
      File "dist\libopensesame\item.py", line 280, in __getattr__
    AttributeError: _allowed_responses not found
    


  • Hi @bwg ,

    You're using a very old version of OpenSesame, and I suspect that this is simply a bug that was present at that point (but has been fixed since). Unless there is a good reason to do otherwise, I would always use the latest version!

    — Sebastiaan

  • bwgbwg
    edited September 2022

    Thank you so much! People who use OpenSesame regularly told me that older experiments don't always work with the newer versions, so I first ran the experiment with the version with which it was created. Now I now better! It runs perfectly in the latest version. Thanks a lot!

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