OS (Win10): PsychoPy version (2022.1.1): Standard Standalone? (y)
I’m trying to send digital EEG codes via a Labjack. I add the parallel component and select “Labjack U3”. When running the experiment, it fails with the errors No module named 'u3' and No module named 'labjack' (see attached screenshot). The U3 is recognized by my computer and I’m able to send codes to my EEG system directly using the LabJack ControlPanel software. Also, for what it’s worth, I have successfully sent codes via the LabJack on this same setup using an earlier version (2020) of PsychoPy.
As always, any thoughts or suggestions will be appreciated!
Hi fmtoma, Andrew,
I am having the same issue. My install of the LabJackPython package ended up in a second copy of python, not the one in the PsychoPy directory. How were you able to install in the PsychoPy directory?
(I am guessing it is not just a matter of moving the folders from one to the other).
Thank you,
Luis
Apologies, it looks like the LabJack dependency wasn’t included in the recent releases. I’ve just fixed that for next release
In the meantime, you can get it installed yourself (into PsychoPy’s python) by pasting this into a command.exe window: "c:\Program Files\PsychoPy\python" -m pip install LabJackPython
from then on the command import u3 should work fine
That is great. Thank you.
Now, I was able to use Coder to send out a 3.5v pulse through the U3 FIO4 port by asking PsychoPy to use a modified copy of labjacks.py. The modification was to simply replace the mapping within the class U3 definition from 6700 to 6004 in the statement:
registerMappings=dict(FIO=6004, EIO=6701,CIO=6702)
The 6004 address I got from Coder’s Demo ‘labjack_u3.py’.
I am not sure that particular modification would work for everyone intending to use labjack, so what I would like to do now is to add a patch to my setup where I can ask Builder to disregard labjacks.py and use my modified version. I tried using the Preferences\Start up Plugin utility but it doesn’t seem to be grabbing my patch. I could very well be doing something wrong as I am not well versed in writing plugins. Any help would be very welcome.
Jon, I see that a new release was posted about 5 days ago. Would it contain the LabJackPython install fix you mentioned above?
I was not able to see it in the changelog.