Error in startMouseTracking function

36 views
Skip to first unread message

Mayan Navon

unread,
Nov 14, 2019, 8:19:57 AM11/14/19
to Minno.js
Hi everyone,

I used startMouseTracking to start logging the mouse movements (and stopMouseTracking to end it).
I've inserted that call during an interaction (see below).
However, I get an error in the console, saying "Uncaught TypeError: lodash$2.contains is not a function".
Is there anything else I need to add to my code?
- The minno time version is set to 'time'.

Here is my showfiles and launch URL. The task is called sortpre.js

Untitled.png


```js

        {
            conditions: [{type:'inputEquals',value:'showFace'}], 
            actions: [
                {type:'showStim',handle:'target'},
                {type:'startMouseTracking', logAs:'tracking', logRate: 15},    //, logStimulusLocation: ['StimulusLocationHandle']            
                {type:'setInput',input: {handle:'groupA',on:'click',stimHandle: 'myGroupAHandle'}},
                {type:'setInput',input: {handle:'groupB',on:'click',stimHandle: 'myGroupBHandle'}},                    
                {type:'resetTimer'} 
            ]
        },

```

ez.im...@gmail.com

unread,
Nov 14, 2019, 10:26:42 AM11/14/19
to Minno.js
Looks like a bug. I'm looking into it.

ez.im...@gmail.com

unread,
Nov 19, 2019, 9:21:31 AM11/19/19
to Minno.js
Hi Mayan,

It should be fixed now, please verify and let me know?

best,
Elad

Mayan Navon

unread,
Nov 19, 2019, 10:28:35 AM11/19/19
to Elad Zlotnick (pi), Minno.js
Hi Elad,

Thanks!

The task is running now. However, I don't see any MT data columns in my iat.txt file.

Here is my (a bit revised) code:

   {
                conditions: [{type:'inputEquals',value:'fixOut'}],
                actions: [
                    {type:'hideStim',handle:'fixation'}, 
                    {type:'showStim',handle:'myGroupAHandle'}, 
                    {type:'showStim',handle:'myGroupBHandle'}, 
                    {type:'showStim',handle:'startHandle'},
                    {type:'setInput',input: {handle:'startButton',on:'click',stimHandle: 'startHandle'}}
                ]
            }, 
            {
                conditions: [{type:'inputEquals',value:'startButton'}], 
                actions: [
                    {type:'removeInput',handle:['startButton']},
                    {type:'startMouseTracking', logAs:'tracking', logRate: 15, logStimulusLocation: ['startHandle']},            
                    {type:'showStim',handle:'target'},
                    {type:'setInput',input: {handle:'groupA',on:'click',stimHandle: 'myGroupAHandle'}},
                    {type:'setInput',input: {handle:'groupB',on:'click',stimHandle: 'myGroupBHandle'}},                    
                    {type:'resetTimer'} 
                ]
            }, 
            {
                conditions: [{type:'inputEqualsTrial', property:'correctResp'}], //Correct
                actions: [
                    {type:'removeInput',handle:['All']},
                    {type:'stopMouseTracking'},
                    {type:'showStim', handle:'correct'},
                    {type:'log'},
                    {type:'trigger',handle:'endTrial', duration:350}
                ]
            },


--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/8f210f9c-4efd-418e-94c7-5a8db8a44f35%40googlegroups.com.


--
Mayan

Elad Zlotnick

unread,
Nov 19, 2019, 2:21:19 PM11/19/19
to Mayan Navon, Minno.js
As far as I know the old server does not support saving the mouse tracking information, you need to run this on the new server.
Alternatively, you can probably use API.save in order to log it manually (you can find the data trial.data.mousetracker).

Mayan Navon

unread,
Nov 21, 2019, 3:28:46 AM11/21/19
to Elad Zlotnick, Minno.js
  Hi Elad,

I tried using API.save and got an error, saying the data I'm sending is too big:
{"message":"response data too long for DB.  Reduce to under 2000 English characters, 1000 for languages like arabic and hebrew, or 500 for east asian languages.  "}

So I'll just use the new server.

Best,
Mayan



--
Mayan
Reply all
Reply to author
Forward
0 new messages