Back to the main page.

Bug 3323 - HTML elements with ft_warning in command line mode

Status CLOSED FIXED
Reported 2017-07-10 12:28:00 +0200
Modified 2017-07-11 13:41:14 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Guillaume - 2017-07-10 12:28:52 +0200

When MATLAB is used without the desktop, or with Octave, warning messages are displayed with HTML links while they should not: Warning: trigger channel XXX looks like noise and will be ignored In spm_eeg_convert at line 92 In spm_eeg_convert at line 117 In ft_read_event at line 1467 In read_trigger at line 85 Also, shouldn't the stack be displayed the other way round? ft_notification.m uses istrue.m: should a copy of it be present in connectivity/private/ ?


Robert Oostenveld - 2017-07-10 14:30:53 +0200

thanks. Do you know how to determine whether the desktop is running?


Robert Oostenveld - 2017-07-10 14:35:27 +0200

ip-145-116-190-200> git commit -a [bug3323-warnings cf567e0] istrue should be present in some private directories, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3323 4 files changed, 129 insertions(+) create mode 100644 connectivity/private/istrue.m create mode 100644 specest/private/istrue.m create mode 100644 statfun/private/istrue.m


Robert Oostenveld - 2017-07-10 14:36:02 +0200

(In reply to Robert Oostenveld from comment #1) I found it status = desktop('-inuse')


Robert Oostenveld - 2017-07-10 14:44:04 +0200

[bug3323-warnings c49ad31] show the deepest level function first, don't show html when desktop is inactive. See http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3323 1 file changed, 7 insertions(+), 2 deletions(-)


Robert Oostenveld - 2017-07-10 14:45:59 +0200

I merged it in https://github.com/fieldtrip/fieldtrip/pull/476


Guillaume - 2017-07-11 12:14:20 +0200

Thanks Robert. The last issue is that when using the Octave GUI, desktop('-inuse') returns true but HTML is still not interpreted. Could the test check whether isdesktop and ~isoctave?


Robert Oostenveld - 2017-07-11 13:31:39 +0200

(In reply to Guillaume from comment #6) Done! [master a97b5d7] use ft_platform_supports to detect html support, not for octave, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3323#c6 2 files changed, 5 insertions(+), 1 deletion(-) mac011> git push upstream master Counting objects: 6, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 697 bytes | 0 bytes/s, done. Total 6 (delta 5), reused 0 (delta 0) remote: Resolving deltas: 100% (5/5), completed with 5 local objects. To github.com:fieldtrip/fieldtrip.git ef53928..a97b5d7 master -> master


Robert Oostenveld - 2017-07-11 13:41:14 +0200

(In reply to Robert Oostenveld from comment #7) hmm, desktop('-inuse') fails if java is not running. The should make it more robust. mac011> git commit -a [master ea14790] more robust desktop detection, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3323#c6 1 file changed, 1 insertion(+), 1 deletion(-)