Back to the main page.

Bug 1555 - multiple warnings of adding FieldTrip

Status CLOSED FIXED
Reported 2012-06-25 15:16:00 +0200
Modified 2012-08-23 10:33:56 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Jörn M. Horschig - 2012-06-25 15:16:08 +0200

Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_singleplotTFR at 92 In figure_alpha_diff at 48 there must be something wrong with the warning, doesn't make much sense that I get the warning more than once - the whole stack is actually quite long: Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_topoplotTFR at 167 In figure_alpha_diff at 37 Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_freqdescriptives at 71 In ft_topoplotTFR at 439 In figure_alpha_diff at 37 the input is freq data with 273 channels, 32 frequencybins and 41 timebins the call to "ft_freqdescriptives" took 0 seconds and an estimated NaN MB Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_prepare_layout at 83 In ft_topoplotTFR at 459 In figure_alpha_diff at 37 reading layout from file CTF275.lay the call to "ft_prepare_layout" took 0 seconds and an estimated NaN MB the call to "ft_topoplotTFR" took 22 seconds and an estimated NaN MB Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_singleplotTFR at 92 In figure_alpha_diff at 43 Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_freqdescriptives at 71 In ft_singleplotTFR at 186 In figure_alpha_diff at 43 the input is freq data with 273 channels, 32 frequencybins and 41 timebins the call to "ft_freqdescriptives" took 0 seconds and an estimated NaN MB the call to "ft_singleplotTFR" took 10 seconds and an estimated NaN MB Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_singleplotTFR at 92 In figure_alpha_diff at 48 Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk > In ft_defaults at 53 In ft_freqdescriptives at 71 In ft_singleplotTFR at 186 In figure_alpha_diff at 48


Robert Oostenveld - 2012-06-25 16:21:47 +0200

I implemented it, so I am to blame... If I run it, I get the following. >> restoredefaultpath >> cd ~/matlab/fieldtrip >> ft_defaults Warning: FieldTrip is not yet on your MATLAB path, adding /Volumes/Data/roboos/matlab/fieldtrip > In ft_defaults at 53 >> ft_defaults >> ft_defaults >> ft_defaults >> ft_defaults might it be that you are on windows and that the path (long string) is not properly segmented on windows? What is your pathsep, i.e. for me it is >> pathsep ans = : And what does path return? >> p = path p = /Volumes/Data/roboos/matlab/fieldtrip/specest:/Volumes/Data/roboos/matlab/fieldtrip/realtime/acquisition/matlab:/Volumes/Data/roboos/matlab/fieldtrip/realtime:..... I am pretty sure that it is due to a difference in the pathsep, which is hardcoded as ':' on line 52 in ft_defaults if isempty(regexp(path, [ftPath ':|' ftPath '$'], 'once'))


Robert Oostenveld - 2012-06-25 16:22:55 +0200

(In reply to comment #1) your warning Warning: FieldTrip is not yet on your MATLAB path, adding M:\FieldTrip\trunk indeed reveals that you are on MS WIndows, and that the ':' is not available as pathsep (because it is required after the M: drive-letter)


Jörn M. Horschig - 2012-06-25 16:33:41 +0200

yep, pathsep is ;


Jörn M. Horschig - 2012-06-25 16:55:18 +0200

haha, small thing ;) great that the filesep in windows is \, which is even greater when working with regular expressions :) took a few minutes to figure out that this is another windows problem ftPath = fileparts(mfilename('fullpath')); % get path, strip away 'ft_defaults' ftPath = strrep(ftPath, '\', '\\'); if isempty(regexp(path, [ftPath pathsep '|' ftPath '$'], 'once')) warning('FieldTrip is not yet on your MATLAB path, adding %s', ftPath); addpath(ftPath); end svn ci ft_defaults.m -m "bugfix 1555 - FT path check and adding fixed for windows" Sending ft_defaults.m Transmitting file data . Committed revision 6152.


Robert Oostenveld - 2012-06-25 16:58:16 +0200

(In reply to comment #4) thanks. It still works for me on OS X >> restoredefaultpath >> cd ~/matlab/fieldtrip >> ft_defaults Warning: FieldTrip is not yet on your MATLAB path, adding /Volumes/Data/roboos/matlab/fieldtrip > In ft_defaults at 54 >> ft_defaults >> ft_defaults >> ft_defaults


Robert Oostenveld - 2012-08-23 10:33:56 +0200

closed multiple bugs that have been resolved for some time