# ERROR could not find a cedrus device

**URL:** <https://discourse.psychopy.org/t/error-could-not-find-a-cedrus-device/9072>\
**Category:** Coding\
**Tags:** buttons\
**Created:** [September 16, 2019, 5:11pm UTC](https://discourse.psychopy.org/t/error-could-not-find-a-cedrus-device/9072 "2019-09-16T17:11:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graham744](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/graham744/32/5103_2.png) [@Graham744](https://discourse.psychopy.org/u/Graham744)\
**Post date:** [September 16, 2019, 5:11pm UTC](https://discourse.psychopy.org/t/error-could-not-find-a-cedrus-device/9072/1 "2019-09-16T17:11:02Z")

</div>

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:

```auto
# 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.

```auto
# 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](https://discourse.psychopy.org/uploads/short-url/8tF11wkBkZWbnnmPc8jRhd5vCSm.py) (35.4 KB)

Demo:  
[buttonbox.demo.py](https://discourse.psychopy.org/uploads/short-url/vAkOomptZBXN6rxvUPnoQoEJRDM.py) (14.7 KB)

---

<div class="post-metadata">

**Author:** ![hvongbg](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@hvongbg](https://discourse.psychopy.org/u/hvongbg)\
**Post date:** [August 12, 2020, 2:31pm UTC](https://discourse.psychopy.org/t/error-could-not-find-a-cedrus-device/9072/2 "2020-08-12T14:31:48Z")

</div>

@Graham744

Did you by any chance find a solution?
