Thread Tools  
Junior Member
Join Date: Nov 2016
angrypanda is on a distinguished road Posts: 3
psychopy and pyxid, Posted November 21st, 2016 #1
Dear All,

I am having some problems with my Lumina LSC-400 and Psychopy (1.84.1) on Windows 7.

The Lumina box is working fine with Presentation, E-prime and PsychToolBox.

It is connected to a Sunix serial interface card, with the serial port assigned to be COM1.

If I follow the pyxid examples I cannot get Psychopy to recognise the Lumina (it moans about returning {} instead of a integer or string). Sorry I don't have the exact error. On the Lumina box I have tried selecting both Lumina and Cedrus RB mode (and a range of baud rates), nothing works.

I have also tried calling get_xid_devices() multiple times, again no joy.

Does anyone have any tips on how to troubleshoot this?

Best wishes,

Reply With Quote
Junior Member
Join Date: Nov 2016
angrypanda is on a distinguished road Posts: 3
more info, Posted November 23rd, 2016 #2
If I just add in the cedrus module into a standard builder view experiment in psychopy then run it, I get the following output:

ERROR could not find a Cedrus device

If instead I create a python script (using the CEDRUS suggested code) and put the following in:

NOTE: I did use the proper indentation - it just doesn't seem to have come through in the quoted text.

import pyxid

# get a list of all attached XID devices
devices = pyxid.get_xid_devices()
devices = pyxid.get_xid_devices() # twice as per suggestion on Cedrus forum

dev = devices[0] # get the first device to use
if dev.is_response_device():

while True:
if dev.response_queue_size() > 0:
response = dev.get_next_response()
# do something with the response
Then I get the following:

####### Running: C:\Users\fmri\Documents\PsychoPy\cedrusTest2\newte #######
Traceback (most recent call last):
File "C:\Users\fmri\Documents\PsychoPy\cedrusTest2\newt", line 6, in <module>
devices = pyxid.get_xid_devices()
File "build\bdist.win32\egg\pyxid\", line 19, in get_xid_devices
File "build\bdist.win32\egg\pyxid\", line 17, in __init__
File "build\bdist.win32\egg\pyxid\ ", line 27, in available_ports
File "build\bdist.win32\egg\pyxid\ ", line 72, in available_ports
File "C:\Program Files\PsychoPy2\lib\site-packages\serial\", line 31, in __init__
super(Serial, self).__init__(*args, **kwargs)
File "C:\Program Files\PsychoPy2\lib\site-packages\serial\", line 162, in __init__
self.port = port
File "C:\Program Files\PsychoPy2\lib\site-packages\serial\", line 206, in port
raise ValueError('"port" must be None or a string, not {}'.format(type(port)))
ValueError: "port" must be None or a string, not <type 'int'>
Please can anyone help with this as I was hoping to use the Lumina with PsychoPy to run an experiment this week - and I'm completely stuck without it.

Best wishes,

Reply With Quote
Join Date: Aug 2006
Location: San Pedro, CA
Hisham is on a distinguished road Posts: 1,119
Posted January 10th, 2017 #3
Jon, where did you get your pyxid? If it’s from pypi, that version is at least 5 years old. The latest version is always available on GitHub.

As a general note: if our software is having trouble detecting an XID device, putting it in various different modes will not help.
Reply With Quote
lumina, psychopy, pyxid, serial
Thread Tools
Posting Rules
Forum Jump:
Copyright Cedrus Corporation, 1991-2014.
All times are GMT -7. The time now is 05:35 PM.