Back to the main page.

Bug 1392 - ft_prepare_leadfield calls 'unknown' ft_preamble

Reported 2012-03-27 11:16:00 +0200
Modified 2012-04-11 16:48:44 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: Linux
Importance: P3 normal
Assigned to: Robert Oostenveld
Depends on:
See also:

Stan van Pelt - 2012-03-27 11:16:35 +0200

When executing ft_prepare_leadfield, ft_preamble is called (line 105). Fieldtrip however states that ft_preamble is unknown.

Robert Oostenveld - 2012-03-27 11:42:14 +0200

the function does % do the general setup of the function ft_defaults ft_preamble help ft_preamble callinfo ft_preamble trackconfig ft_preamble loadvar data and in the first ft_defaults call the path should be set to include fieldtrip/utilities, where ft_preamble is located. Can you check your path - prior to ft_defaults - after ft_defaults? Can you do "which ft_preamble"?

Stan van Pelt - 2012-03-27 11:53:46 +0200

i think the problem is that the folder /utilities is not added to the path by ft_defaults. when I do this manually, the problem is gone.

Robert Oostenveld - 2012-03-27 12:48:39 +0200

can you check with the debugger what happens around line 63 in ft_defaults? if isempty(which('ft_hastoolbox')) % the fieldtrip/utilities directory contains the ft_hastoolbox function % which is required for the remainder of this script addpath(fullfile(fileparts(which('ft_defaults')), 'utilities')); end might it be that you have another (older) utilities on your path?

Stan van Pelt - 2012-03-27 13:50:37 +0200

That was probably it. there were some directories of older FT versions in my path, including /utilities. After removing these from the path, and running ft_defaults again, things work ok again: /utilities is in the path. thanks!

Robert Oostenveld - 2012-03-27 20:51:04 +0200

thanks for looking at it in detail

Robert Oostenveld - 2012-04-11 16:48:44 +0200

I cleaned up my bugzilla list by changing the status from resolved (either fixed or wontfix) into closed. If you don't agree, please reopen the bug. Robert