Welcome! Log In Create A New Profile

Advanced

Dot Indexing Error Led to Unrecognized Field AdjustedPPD

Posted by KhaledMTL 
Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 15, 2024 02:57PM
Hello,

I was writing a new Timing File and Conditions File and whenever I would hit run, MonkeyLogic would start up then give the error in the attached picture. I attempted to resolve this by deleting the configuration file, as suggested in this thread.

However it would not resolve this issue. I tried locating a different version of this configuration file in a previous/different MonkeyLogic version and I could not. At this point, other condition files would load up.

I tried to load up a cfg file that works then to attempt loading my new Conditions File when I received this message:

PsychStartup: Adding path of installed GStreamer runtime to library path. [C:\gstreamer\1.0\msvc_x86_64\bin]
Warning: While loading an object of class 'mlconfig':
Unrecognized function or variable 'mlpath'. 
> In matfinfo (line 9)
In finfo>fetchDescriptions (line 262)
In finfo (line 79)
In uiimport/gatherFilePreviewData (line 419)
In uiimport (line 260) 
Warning: While loading an object of class 'mlconfig':
Unrecognized function or variable 'mlpath'. 
> In uiimport/runImportdata (line 459)
In uiimport/gatherFilePreviewData (line 438)
In uiimport (line 260)


Since then, attempting to load up any conditions file causes the following message to pop up the first time:


<<< MonkeyLogic >>> Unrecognized method, property, or field 'AdjustedPPD' for class 'mlconfig'. (monkeylogic/update_videoUI, Line 141)
Warning: Unrecognized method, property, or field 'AdjustedPPD' for class 'mlconfig'.
(monkeylogic/update_videoUI, Line 141) 
> In monkeylogic/warning_handler (line 2787)
In monkeylogic/init (line 2275)
In monkeylogic (line 42)
In NIMHMonkeyLogic22App/startApp (line 84)
In NIMHMonkeyLogic22App (line 48)
In appinstall.internal.runapp>execute (line 116)
In appinstall.internal.runapp>runapp13a (line 95)
In appinstall.internal.runapp>preamble18b (line 60)
In appinstall.internal.runapp (line 13)
In matlab.apputil.run (line 45) 
Unrecognized method, property, or field 'AdjustedPPD' for class 'mlconfig'.

Error in monkeylogic/update_videoUI (line 141)
        set(hTag.AdjustedPPD,'value',MLConfig.AdjustedPPD);

Error in monkeylogic/update_UI (line 56)
        if ~isempty(hTag.hVideo), update_videoUI(); end

Error in monkeylogic/init (line 2276)
        update_UI(); old_MLConfig = MLConfig;  % in case loadcfg() does not do this

Error in monkeylogic (line 42)
init();

Error in NIMHMonkeyLogic22App/startApp (line 84)
                eval('monkeylogic');

Error in NIMHMonkeyLogic22App (line 48)
            startApp(obj)

Error in appinstall.internal.runapp>execute (line 116)
out = evalin('caller', [script ';']);

Error in appinstall.internal.runapp>runapp13a (line 95)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));

Error in appinstall.internal.runapp>preamble18b (line 60)
    appobj = runapp13a(appinstalldir);

Error in appinstall.internal.runapp (line 13)
    out = preamble18b(appinstalldir);

Error in matlab.apputil.run (line 45)
appinstall.internal.runapp(appName, appLocation);


And the following on reattempt:

<<< MonkeyLogic >>> Unrecognized method, property, or field 'AdjustedPPD' for class 'mlconfig'. (monkeylogic/update_videoUI, Line 141)
Unrecognized method, property, or field 'AdjustedPPD' for class 'mlconfig'.

Error in monkeylogic/update_videoUI (line 141)
        set(hTag.AdjustedPPD,'value',MLConfig.AdjustedPPD);

Error in monkeylogic/update_UI (line 56)
        if ~isempty(hTag.hVideo), update_videoUI(); end

Error in monkeylogic/loadcfg (line 2745)
        update_UI(true);  % sanity check

Error in monkeylogic/UIcallback (line 690)
                            loadcfg(Conditions.MLPath.ConfigurationFile);
 
Error while evaluating UIControl Callback.


Can you help me fix this problem or give me insight on what caused the initial dot indexing error and if it is related to the error that followed

Appreciate your time and support!
Attachments:
open | download - dotindexing.PNG (19.7 KB)
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 15, 2024 03:53PM
Also, not sure if this helps solve the issue, but when I could successfully load the new conditions file (but not run it due to dot indexing error) the 1.5 degree yellow crc TaskObject I had created was larger than the same 1.5 degree yellow circle graphic object I used to observe from older condition files that did run at the time.
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 15, 2024 05:04PM
You might install multiple NIMH ML versions and have the search path messed up. Try cleaning the search path with the following commands and reinstalling the latest NIMH ML.
delete(which('startup.m'))
restoredefaultpath
matlabrc
savepath
exit

The stimulus size changed probably because the screen size was set differently between the config files.
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 16, 2024 12:35PM
Thank you, that makes sense considering AdjustedPPD was added in the newer version. I ran the lines of code your provided but the exit command returned the following:

<<< MonkeyLogic >>> NIMH MonkeyLogic 2.2.34 (Mar 2, 2023)
<<< MonkeyLogic >>> Microsoft Windows [Version 10.0.19045.4780]
<<< MonkeyLogic >>> MATLAB 9.13.0.2126072 (R2022b) Update 3
<<< MonkeyLogic >>> NIMH daqtoolbox 1.0.77 (Jan 9, 2023)
<<< MonkeyLogic >>> National Instruments NI-DAQmx 22.8
<<< MonkeyLogic >>> Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
<<< MonkeyLogic >>> Detected 4 "AMD64" processors
<<< MonkeyLogic >>> Found 2 video device(s)...
<<< MonkeyLogic >>> Found 2 DAQ adaptor(s), 2 board(s)
>> delete(which('startup.m'))
>> restoredefaultpath
>> matlabrc
>> savepath
>> exit
'mlsetdiff' is not found in the current folder or on the MATLAB path, but exists in:
    C:\Users\labuser\AppData\Roaming\MathWorks\MATLAB Add-Ons\Apps\NIMHMonkeyLogic22

Change the MATLAB current folder or add its folder to the MATLAB path.

Error in mlconfig/fieldnames (line 107)
            field = mlsetdiff(properties(obj),[obj.DependentFields obj.TransientFields]);

Error in mlconfig/isequal (line 154)
            field = setdiff(fieldnames(obj),{'EyeNumber','JoystickNumber'});

Error in monkeylogic/check_cfg_change (line 2698)
        if isequal(MLConfig,old_MLConfig), return, end

Error in monkeylogic/closeDlg (line 2670)
        check_cfg_change();
 
Error while evaluating Figure CloseRequestFcn.

Can you help me proceed from here? I did not reinstall the newest version of ML yet due to this error. Thank you again!
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 16, 2024 01:07PM
I had not followed your previous steps correctly, so thank you that worked, I navigated to the MonkeyLogic directory and ran the lines of code successfully. However, I then updated the monkeylogic version using the mlappinstaller and when I opened MonkeyLogic, uploaded my new conditions file and ran I no longer would face the Unrecognized AdjustedPPD field but rather I am back at this error:

Dot indexing is not supported for variables of this type.

Error in mltracker (line 15)
obj.Screen=MLConfig.Screen;

Error in EyeTracker (line 13)
obj@mltracker(MLConfig,TaskObject,CalFun,DataSource,varargin{:});

Error in TimingFileKAS_runtime (line 1933)
ontarget=EyeTracker('acquirefix',fix,fix_radius,fix_wait_time);

Error in run_trial (line 132)
        runtime(MLConfig,TrialRecord,TaskObject,TrialData);

Error in monkeylogic/UIcallback (line 919)
                    result = run_trial(MLConfig,datafile);
 
Error while evaluating UIControl Callback.

I also deleted my conditions file's cfg prior to selecting it.
Is there something I am missing with the file directories and ML versions? I would appreciate the support, thanks. I did not delete the monkeylogic files in the Apps folder and attached is a picture of that current folder.
Attachments:
open | download - mlfiel.PNG (12.5 KB)
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 16, 2024 01:22PM
Weirdly other conditions files can run without any issue. I have been examining and comparing their cfg files but they do not appear to have a difference. If I attempt to copy and paste the contents of both conditions and timing files and use the new files to run ML I still face the same dot indexing error, which leads me to suspect my script itself has a bug. I have attached the timing and conditions files, I sincerely appreciate if you can take a look and thank you a lot for your time again!
Attachments:
open | download - ConditionsFileBug.txt (640 bytes)
open | download - TimingFileBug.m (2 KB)
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 16, 2024 04:01PM
You made a mistake (actually three of the same mistake) in your script indeed, but I am not going to tell you what it is. You are supposed to fix a problem that you created yourself.
Re: Dot Indexing Error Led to Unrecognized Field AdjustedPPD
August 16, 2024 04:34PM
Thank you very much! That was helpful and I was able to find the mistake, appreciate the support.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.