Hi
The error is related to the line
current_resp = key_resp_2.keys.join('');
The issue is that you need to only execute this line if at least one key has been pressed.
You could try
if key_resp_2.keys:
current_resp = key_resp_2.keys.join('');
or
if (_key_resp_2_allKeys.length > 0)
as I suggested here. Cannot read property 'length' of undefined (getting typed response on Pavlovia) - #5 by wakecarter