[Eeglablist] Error using dipfit

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Jun 11 05:52:39 PDT 2025


Dave,

At first sight an issue with your matlab path, and this is very hard to debug from a distance.

If I read the code in ft_defaults.m (Fieldtrip-lite v20240111) line 84 should protect you against the error that is thrown by EEGLAB. The error happens when MATLAB tries to execute line 201 in ft_defaults, which is a call to the function ft_warning, which for some reason cannot successfully complete. This is strange, because the earlier mentioned line 84 in ft_defaults should ensure that the variable ft_warning will be pointing the the built-in MATLAB function called ‘warning', provided ‘ft_warning.m’ cannot be found on the MATLAB path (yet).

In order to diagnose this further, I would use the MATLAB debugger (i.e. put breakpoints in the code and go through the code step by step so that you can inspect what is going on), and first start in a fresh MATLAB session, execute restoredefaultpath, navigate to the fieldtrip folder, and then type ft_defaults on the command line.

Best wishes,
Jan-Mathijs


> On 6 Jun 2025, at 01:32, Jenson, David Evans via eeglablist <eeglablist at sccn.ucsd.edu> wrote:
>
> eeglablist,
>
> I am experiencing an error with dipole localization in EEGLAB and have been unable to get past it.  EEGLAB was running fine on my old machine, but our department just upgraded to new machines, and I am experiencing errors that I can’t seem to get past.
>
> I am using Matlab R2024b and EEGLAB v2024.2.1 on a MacBook Pro running macOS 15.5 (I’ve also tried EEGLAB v2025.0.0 and am still having the same issue).  After running ICA and co-registering channels, I have tried running “Source localization using DIPFIT -> component dipole autofit.”
>
> When I do this, I get the following error message:
>
> “EEGLAB error in function ft_defaults() in line 201:
> Unrecognized function or variable ‘ft_warning’.
> This is a problem with FIELDTRIP.  The Fieldtrip version you downloaded is corrupted.  Please manually replace Fieldtrip with an earlier version and/or email the Fieldtrip developers so they can fix the issue.”
>
> I have looked through the code for ‘ft_defaults()’ and see the call to ‘ft_warning’ but am unsure why it wouldn’t be working.  I am getting this error message when using “Fieldtrip-lite v20240111” as a plug-in.  However, I have also tried removing the plugin and adding “fieldtrip-20250523” to the Matlab path and am still getting the same error.  I have deleted and reinstalled different versions of the FieldTrip toolbox multiple times and reset the Matlab path.  I am unsure how best to proceed.
>
> I have reached out to the FieldTrip developers, but am hoping that someone here might have experienced this and knows how to get past it.
>
> Thanks,
>
> -Dave Jenson
> _______________________________________________
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu or visit https://sccn.ucsd.edu/mailman/listinfo/eeglablist .



More information about the eeglablist mailing list