Unclear Error Message

beshoy.agayby's Avatar

beshoy.agayby

26 Mar, 2019 10:02 PM

Hi Chris,
I get the following error and warning:
ERROR: Cannot index list with undefined
WARNING: Subscript evaluation failed. Returning 0 instead.
The experiment runs well regardless of the error, but I am trying to find out the reason for this. In the protocol, there is a variable list that is defined and then a range replicator which changes an index to pick elements from that list. I tried changing the variable type in that index variable, but it didn't solve it. I didn't see the error when I removed the range replicator and kept everything else (so the same value is picked from the list as the index isn't changed).

Any idea what causes this?

Cheers,
Beshoy

  1. Support Staff 1 Posted by Christopher Sta... on 27 Mar, 2019 05:23 PM

    Christopher Stawarz's Avatar

    Hi Beshoy,

    That is strange. "Undefined" is a value used internally by MWorks (sort of like Python's None), but you shouldn't be able to generate it in your experiment.

    Can you send me the experiment file that produces this error? I'd like to understand how this is happening, as it might indicate a bug somewhere.

    Thanks,
    Chris

  2. 2 Posted by beshoy.agayby on 29 Mar, 2019 01:37 PM

    beshoy.agayby's Avatar

    Hi Chris,

    I attached the file, it has several protocols. I tried testing them separately and I think the problem starts with the RF mapping protocol.

    Cheers,
    Beshoy

  3. Support Staff 3 Posted by Christopher Sta... on 12 Apr, 2019 04:54 PM

    Christopher Stawarz's Avatar

    Hi Beshoy,

    Thanks for sending your experiment.

    It looks like there is some issue in how the values of local-scope variables are assigned during load time. I haven't yet determined exactly what's happening, but I'm sure I'll figure it out eventually.

    In the meantime, I don't think you need to worry about this, since (as you noted) it doesn't appear to affect how things work when the experiment runs.

    Cheers,
    Chris

  4. 4 Posted by beshoy.agayby on 14 Apr, 2019 03:44 PM

    beshoy.agayby's Avatar

    Hi Chris,

    Thanks for looking into it. You are right, so far it's not causing the experiment to malfunction. I was just curious and wanted to make sure there is nothing I am missing.

    Cheers,
    Beshoy

  5. Christopher Stawarz closed this discussion on 16 Apr, 2019 01:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac