psychopy.org | Reference | Downloads | Github

ERROR could not find a cedrus device

Hello,

This is my first time posting on the forum. Please let me know if you require any further clarification or material that I may have omitted in this post.

I am having difficulty using my RB-740 cedrus response box. Currently I am running windows 10 and my version of Psychopy is 3.2.3.

I created my experiment using the builder but I have attached my code for anyone to view. I am running a Posner cueing paradigm in which photographs of men’s faces are presented before a target shape with the participants would classify using with a button response using the cedrus response pad. I have specified a cedrus devices as what I will be using for participants responses. However when I go to run the experiment I get an error.

ERROR 10.3516 could not find a cedrus device.

The code for importing pyxid2 looks like this:

# Start Code - component code to be run before the window creation
try:  # to use the Cedrus response box
   import pyxid2 as pyxid
except ImportError:
   import pyxid
try:  # to use the Cedrus response box
   import pyxid2 as pyxid
except ImportError:
   import pyxid
try:  # to use the Cedrus response box
   import pyxid2 as pyxid
except ImportError:
   import pyxid

The initialization of my trial routine looks like this.

# Initialize components for Routine "trial"
trialClock = core.Clock()
buttonBox_3 = None
for n in range(10):  # doesn't always work first time!
    try:
        devices = pyxid.get_xid_devices()
        core.wait(0.1)
        buttonBox_3 = devices[0]
        break  # found a device so can break the loop
    except Exception:
        pass
if not buttonBox_3:
    logging.error('could not find a Cedrus device.')
    core.quit()

I have download xidon 2 (cedrus software for response pads) to determine if the issue was due to a problem with the USB connection however this was not the case as it is able to find my device and record button presses.

Furthermore, when I create a demo experiment using builder and a text object (script also attached) I am able log button presses.

Any advice on what the problem may be would be greatly appreciated.

Thank you,

Experiment:

facial_cueing_all_faces_demo_20190910_polygon_button_box_demo.py (35.4 KB)

Demo:
buttonbox.demo.py (14.7 KB)

@Graham744

Did you by any chance find a solution?