> On 21 Mar 2017, at 16:53, Lauren Nelson <lmnel...@bu.edu> wrote:
> 
> I'm having trouble passing a text file to SampleAttributes, and I -think- 
> what my problem might be is that my text file has more columns than I thought 
> it did. Vim seems to think it has 3894 columns.

What makes you think that? Do you mean columns as in (1) strings separated by 
some separator string (e.g. whitespace), or (2) columns as in characters?

> I have a couple questions. Does the following error message seem consistent 
> with this?
> And if so, is there a possible way to fix this? Even better, is there a way 
> to read in an Excel spreadsheet? That's the file format I'm starting with.
> 
> >>> attr = SampleAttributes(attr_fname)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/dist-packages/mvpa2/misc/io/base.py", line 426, in 
> __init__
>     sep=None, dtype=dtypes)
>   File "/usr/lib/python2.7/dist-packages/mvpa2/misc/io/base.py", line 118, in 
> __init__
>     dtype=dtype, skiplines=skiplines)
>   File "/usr/lib/python2.7/dist-packages/mvpa2/misc/io/base.py", line 258, in 
> _from_file
>     "of columns in header [%i]." % (len(l), len(hdr))
> RuntimeError: Number of entries in line [3] does not match number of columns 
> in header [2].

Can you provide the output of the first few lines of your text file? PyMVPA 
seems to think there are either 2 or 3 columns (with meaning (1), separated by 
some separator string)


_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Reply via email to