# Psychopy to pavlovia error

**URL:** https://discourse.psychopy.org/t/psychopy-to-pavlovia-error/14000
**Category:** Online experiments
**Created:** [June 5, 2020, 1:43pm UTC](https://discourse.psychopy.org/t/psychopy-to-pavlovia-error/14000 "2020-06-05T13:43:38Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [February 8, 2021, 11:01am UTC](https://discourse.psychopy.org/t/psychopy-to-pavlovia-error/14000/11 "2021-02-08T11:01:22Z")

</div>

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

```auto
if key_resp_2.keys:
     current_resp = key_resp_2.keys.join('');

```

or

```auto
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](https://discourse.psychopy.org/t/cannot-read-property-length-of-undefined-getting-typed-response-on-pavlovia/14442/5)

---

_[View the full topic](https://discourse.psychopy.org/t/psychopy-to-pavlovia-error/14000)._
