Windows error 126: module not found
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 ofinline_scriptthat uses it. Can you post theinline_scriptthat triggers the error?— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
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 downloaddlportio.dllfrom 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 thedllsimply extract it to the OpenSesame program folder.-- Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
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 foundexception type:
AttributeErrorThe 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
dlportiois not properly installed, presumably because there is an additional filedlportio.systhat is required in addition to the.dlland 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?
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sorry for posting too little information. Here's the full error message:
Stopped
The experiment did not finish normally for the following reason:
Details
experiment[run].Block_Loop[run].BlockSeq[run].Sequence_Loop[run].GameSeq[run].selection_loop[run].selection_seq[prepare].new_keyboard_response[prepare]_allowed_responses not foundThu Sep 15 12:59:12 2022AttributeErrorTraceback (also in debug window)
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
Check out SigmundAI.eu for our OpenSesame AI assistant!
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!