[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: explanation what "error: can't redefine read-only symbol foo" means
From: |
John W. Eaton |
Subject: |
Re: explanation what "error: can't redefine read-only symbol foo" means in detail |
Date: |
Tue, 6 Mar 2007 12:31:28 -0500 |
On 6-Mar-2007, Andreas Romeyke wrote:
| Hi,
|
| David Bateman wrote:
| > So I don't see what the problem is. Can you give a full example...
| >
| The problem is that the original function comes from Matlab and dies on
| Octave with error message above. I do not understand why this message is
| generated, because the function is large but not too complicated.
|
| Therefore it would be helpful to have an example that generates the
| message above. The function is from the EEGLab toolbox and is called
| eeg_checkset(). The m-file is attached, it dies on line 925.
|
| Here the output:
|
| Extracting events...
| Importing data events...
| Removing event channel...
| error: can't redefine read-only symbol `eeg_checkset'
| error: `eeg_checkset' undefined near line 925 column 25
| error: evaluating switch command near line 837, column 9
| error: evaluating for command near line 836, column 5
| error: evaluating if command near line 835, column 1
| error: called from `eeg_checkset' in file
| `/SCR/svn_work/eeglab-devel-5.03/eeglab5.03/functions/eeg_checkset.m'
| error: evaluating assignment expression near line 234, column 9
| error: evaluating if command near line 226, column 1
| error: called from `pop_biosig' in file
| `/SCR/svn_work/eeglab-devel-5.03/eeglab5.03/functions/pop_biosig.m'
| error: evaluating assignment expression near line 10, column 5
|
| Could it be that the problem depends on type of variable, because the
| EEG-variable is global by default (set in toolbox)?
|
| Any hints?
I tried running your file and I see
octave2.9:1> eeg_checkset
error: `argn' undefined near line 0 column 10
error: evaluating argument list element number 1
error: evaluating assignment expression near line 13, column 5
error: called from `inputname' in file
`/usr/share/octave/2.9.9/m/miscellaneous/inputname.m'
error: evaluating argument list element number 2
error: evaluating assignment expression near line 742, column 5
error: called from `eeg_checkset' in file `/tmp/eeg_checkset.m'
so it does not seem to be a complete example. It looks like
eeg_checkset is intended to be called from another function in eeglab,
so calling it from the command line with no arguments fails. How am I
supposed to call eeg_checkset so that I can reproduce the problem? If
you send something that we can actually run then maybe we can help.
But please try to pare it down to a small example that demonstrates
the problem.
jwe