EEG mark Marker report error:

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.2.3
Standard Standalone? (y/n) If not then what?:y

What did you try to make it work?:



image

What specifically went wrong when you tried that?:
Traceback (most recent call last):
File “D:\YT\1\Psychopy_EEG_DemoBuilder\EEGDemo_lastrun.py”, line 108, in
p_port = parallel.ParallelPort(address=‘HDFF0’)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\parallel_inpout.py”, line 48, in init
_inp = self.port.Inp32(self.base + 0x402)
TypeError: must be str, not int
Include pasted full error message if possible. “That didn’t work” is not enough information.

Do you get the same error if you make your markers a, b, c, etc?

Are those spaces I can see in your file names?

When I try A, B, C, the same mistake happens
image

My EEG device is BP. Strangely, I was able to successfully tag using Eprime, with the following results:

Hi @wen,

This seems as though it’s an issue with the port address and the inpout32.dll driver file:

p_port = parallel.ParallelPort(address=‘HDFF0’)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\parallel_inpout.py”, line 48, in init
_inp = self.port.Inp32(self.base + 0x402)
TypeError: must be str, not int

I can see you’re running the 2021.2.3 version of PsychoPy, would you be able to update to the most recent version? There have been some improvements made to the accessibility of these drivers in the 2022 releases onward, and this could be causing your issue.

Which version do you recommend?

I would recommend that you download the latest version (2022.2.2) that you can download using the blue button here. Releases after this will also be bug-fix releases so I also recommend that you keep it up to date to ensure that you’re getting the best version possible.

Thanks,

Kim

Thank you. I’ll have a try

When I tried the new version, I still got the following error:
Traceback (most recent call last):
Hello from the pygame community. Contribute - pygame wiki
1.5490 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
6.8749 WARNING User requested fullscreen with size [1280 720], but screen is actually [1440, 900]. Using actual size
C:\Program Files\PsychoPy\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
File “D:\YT\1\Psychopy_EEG_DemoBuilder\EEGDemo_lastrun.py”, line 118, in
p_port = parallel.ParallelPort(address=‘HDFF0’)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\parallel_inpout.py”, line 44, in init
_inp = self.port.Inp32(self.base + 0x402)
TypeError: can only concatenate str (not “int”) to str

Hi @wen,

Thanks for trying - can I just confirm that your parallel port address ‘HDFF0’ is the one shown when you navigate to: Device Manager (on your PC) > Ports > The port you’re using > Resources tab? I’ve known different systems require this address to be written in different ways, so it may need to be written slightly differently to when you ran in Eprime.

The details are as follows

I changed HDFF0 to 0xDFF0, the program did not report any error, but it could not hit marker

Hi @wen,

So, at least we’ve narrowed the issue down to the address of the port. What address is shown in the Resources tab of the port you’re using in the Device Manager?

Thank you for your reply and patience.

Display COM1 and LPT3 in my port information.

Hi @wen,

Sorry for the delay here. What is shown when you double click on the port, and then in the Resources tab as shown in this screenshot:

Thank you for waiting. The details are as follows:

How do I write the port number next?

Hi @wen,

Could you try 0xFF? It’s worth noting too that this is an address range, so you could also try other addresses in the range of 0xFF0 to 0xFF7.

Also, could you set the duration of your pulse to something like 100ms so that it’s definitely long enough to be picked up by the recording device.

Thanks,

Kim