I’m new to PsychoPy, and am trying to make an experiment run that was built in an old version of PsychoPy (v1.80.03). It won’t run on v1.84.0. The error message I get is “[Errno 2] could not open port” /dev/tty.USA19Hfd13P1.1: [Errno 2] No such file or directory: ‘/dev/tty.USA19Hfd13P1.1’."
I’m wondering if it will run on an older version of PsychoPy, and if so, is there a standalone download for older versions (v1.80.03) for either Windows or Mac?
The error is complaining about not being able to access the serial port. Have you shifted to using a different computer? On a modern computer, I guess that means you need to install/re-install a driver to access your serial port via USB adapter.
i.e. this may not really be related to a new PsychoPy version at all.
Thanks for your replies! It occurred to me that this is about accessing the serial port on my computer- is this the serial port for the button box or scanner trigger? Is there a way to figure out my serial port name in Mac OS X without hooking up my computer to the box?
I think if your USB serial adapter is plugged in at the time, then hopefully it will come up in the list. They can have inscrutable names but if you unplug it and issue this command again, hopefully you’ll be able to identify it as the one that is no longer there.
I am having trouble identifying the serial port name even after plugging in the USB to my mac. I think this might be because the device is a homemade fMRI trigger box, which is also the same signal for capturing key presses via some sort of converter box. My mac can identify the device, so I thought it was just an issue of installing the right driver, but it appears that the device was built with USB HID communication to the computer so no driver is needed.
Now, I tried using a generic serial port name “ttys000” into my code, and I get the following error message:
2016-09-12 09:37:47.266 python[1774:507] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/1x/f4z859vj24d06j_c66rxhhq40000gp/T/org.psychopy.PsychoPy2.savedState
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “/Users/Angela/Desktop/Moran2006PyschoPy/BandWagon_WordList1_9.12.16.py”, line 22, in
ser = serial.Serial(’/dev/ttys000’, 115200, timeout = .0001)
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialutil.py”, line 182, in init
self.open()
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialposix.py”, line 265, in open
self._update_dtr_state()
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialposix.py”, line 595, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
IOError: [Errno 25] Inappropriate ioctl for device
Is this just a keyboard emulator? If so, just treat it like a regular key press coming from your keyboard. This isn’t uncommon for some fMRI button boxes.