#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

# PST SR-Box through USB in 3.1.3 issues...

edited November 2016

Hi all,

I'm translating a lexically-guided perceptual learning experiment to OpenSesame and would like to use our PST SR-Box (model 200A) as we're going to be running this experiment with people with Aphasia and a keyboard response may be too complicated or difficult.

Our testing PC's are brand new, so unsurprisingly they do not have a serial port. Luckily, the computer recognizes the SR-Box using a serial-to-USB adapter and OpenSesame 3.1.3 will allow responses from the SR-Box properly (by that, I mean pressing button 1 outputs a "1", button 2 outputs a "2", etc). However, when I try to specify only two allowed responses (in this case, buttons 1 & 5) or specify which lights to turn on, it crashes with the error:

item-stack: experiment[prepare].new_srbox_1[prepare]
exception message: invalid literal for int() with base 10: 'kp1'


I'm trying to figure out what the source of this issue is; OpenSesame seems to have no problem recognizing and reading responses from the SR-Box, which is good. However, when adding "1;5" to the "Allowed Responses" field, it crashes. Is this syntax not appropriate anymore? I previously used that way to denote allowed responses in 2.9.X and it functioned normally.

Your help is very much appreciated (I really would like to avoid E-Prime)!

## Comments

• Hi,

So if I understand correctly, an error occurs when you enter a semicolon-separated list of numbers in either the 'Turn on lights' field or the 'Allowed responsed' field. Is that correct? If so, could you post the full stracktrace (from the debug window) here for both errors? (Because they are probably slightly different.)

Cheers!
Sebastiaan

• edited November 2016

@Jarik just reported the same issue on GitHub (# 488). We'll work on it there.

• edited December 2016

Hi! Just wanted to mention that I get a similar message when I try to specify allowed responses for my saitek gamepad. The error does not occur when I leave "Allowed Responses" blank.

Here's the stuff (which I call "gobbledigook") from the debug window:

Starting experiment as ExperimentProcess-3
Expyriment 0.8.1.opensesame2 (Python 2.7.12)
openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 1024
openexp.sampler._legacy.init_sound(): mixer already initialized, closing
experiment.run(): experiment started at Fri Dec 02 12:20:03 2016
experiment.run(): disabling garbage collection
C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\parallel_port_trigger_init\inpout32.dll
C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\var_store.py:236: UserWarning: var pptrigger_port is stored as attribute of item experiment
% (var, self.__item__.name))
experiment.end(): enabling garbage collection

Unexpected error

item-stack: experiment[run].practice_loop[run].oneblock_sequence[run].block_loop_repeat_trial_several_times[run].trial_sequence[prepare].new_joystick[prepare]
exception message: invalid literal for int() with base 10: 'kp1'
time: Fri Dec 02 12:20:10 2016
exception type: ValueError

Traceback:
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\misc\process.py", line 140, in run
exp.run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\experiment.py", line 413, in run
self.items.execute(self.var.start)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 91, in execute
self.run(name)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\sequence.py", line 51, in run
self.experiment.items.run(_item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\loop.py", line 337, in run
self.experiment.items.execute(self._item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 91, in execute
self.run(name)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\sequence.py", line 51, in run
self.experiment.items.run(_item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\loop.py", line 337, in run
self.experiment.items.execute(self._item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 90, in execute
self.prepare(name)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 122, in prepare
self[name].prepare()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\sequence.py", line 124, in prepare
self.experiment.items.prepare(_item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 122, in prepare
self[name].prepare()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\base_response_item.py", line 115, in prepare
self._collect_response = self.prepare_response_func()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\share\opensesame_plugins\joystick\joystick.py", line 86, in prepare_response_func
self._allowed_responses = [int(r) for r in self._allowed_responses]
ValueError: invalid literal for int() with base 10: 'kp1'

• @jtpar Could you check whether (or confirm that) this issue still exists in 3.1.4?

• sorry for the delay. yes, it does, I'm afraid

• @sebastiaan isn't this fixed in the to-be-released 3.1.5?

• Ow right, I got my milestones mixed up. The fix will indeed be included in 3.1.5!

• sweet! thanks!!

• Is it already fixed? is there any workaround?
I got the same error message...

• Hi Noa,

It is supposed to be fixed already, that is if you run a version of Opensesame that is 3.1.5 or younger. Can you check whether you have the problem while running th latest Opensesame version?

Eudard

Sign In or Register to comment.