| Reference | Downloads | Github

Problems with running a routine that involves response via mouse click and feedback on pavlovia

URL of experiment:

Description of the problem: I am trying to collect response using a mouse click and I am unable to run it on pavlovia. It works fine in the psychopy builder. In the experiment I have 12 clickable components and I provide feedback sound based on correct or incorrect response. When running the experiment online it gives me an error saying mouse.ispressedin is not a function. Any help with how to best translate this into JS would be really helpful since this is the last step before launching the experiment.

I am new with Psychopy, and in have not worked much with the mouse component. However, I managed to solved many doubts and problems I had when translating things from Python to JavaScript by looking carefully into the PsychoJS source code. If you take some good time and look carefully I am sure you will find the answer.

Here is a link to the source code of the mouse component in JavaScript:

Having a document as reference for the translations of the different functions and methods between PsychoPY and PsychoJS would be a great for everyone. Unfortunately, that is something that doesn’t exist yet.

I am working on such a document. Anyone can make suggestions for additions and edits to it.

Best wishes,



Wooowwww!!! That document is amazing!! You have done great job documenting all this stuff. Knowing about it would have saved me many days trying to figure out most of those things. You should ask the PsychoPy team to make it available somehow whenever the program starts. :smiley:

Thanks. What do you think @jon? Could a link to it be added such that people can find it once they start searching for help with getting their studies online?

I don’t know about “whenever the program starts” but we could certainly link to this from within the documentation. Maybe from a troubleshooting page? And/or maybe we could add a hyperlink to one of our dialog boxes (the Runner?)

Thanks @wakecarter for the work you’ve put into keeping track of the issues in this document :slight_smile: Hopefully we’ll also be able to use it to gradually cut them down. Ultimately, we would obviously like not to need such a document!

1 Like

Yes, a cheat sheet would be really handy! I had break down isPressedin --> mouse.get pressed followed by an if loop to execute my feedback.