Psychopy.hardware.parallel

Hi:

I created a routine to wait for scanner triggers with parallel port communications, following the instructions that appears in Communicating with fMRI — PsychoPy v2022.2.5. When running it, I got the error “ModuleNotFoundError”: No module named ‘psychopy.hardware.parallel’. Why? Must I install another library? I am running psychopy in Windows 10 Pro.

Sincerely,

Gonzalo Rojas Costa

Dear Gonzalo,
I am currently having the same problem. Have you managed solving it in the meantime?
Best,
Marius

Any answer?

Thanks for bringing this to our attention! Those docs may now be outdated. Once we’ve got a working solution here I can update those.

Instead of:

from psychopy.hardware.parallel import ParallelPort

could you please try:

import parallel

and let me know if that works?

Thanks,

Kim

Dear Kimberley:

I modified the code to:
“from psychopy.hardware.parallel import parallel
triggers = parallel(address = 0x0378) #Change this address to match the address of the Parallel Port that the device is connected to
pinNumber = 4 #Change to match the pin that is receiving the pulse value sent by your scanner. Set this to None to scan all pins”

and I got the following error:
"File “C:\Users\Public\Documents\CLC\fondecyt\3stroopExp_espanol_emocional_7\stroop_Emotional_lastrun.py”, line 122, in
from psychopy.hardware.parallel import parallel
ModuleNotFoundError: No module named ‘psychopy.hardware.parallel’
################# Experiment ended with exit code 1 [pid:7384] "

Just two words instead of six

1 Like

Ok. I tested with two words: “import parallel”, and I got the following error:

" File “C:\Users\Public\Documents\CLC\fondecyt\3stroopExp_espanol_emocional_7\stroop_Emotional_lastrun.py”, line 122, in
import parallel
ModuleNotFoundError: No module named ‘parallel’
################ Experiment ended with exit code 1 [pid:22604] #################"

Please try

from psychopy import parallel