[pymvpa] problem loading attributes file

Yaroslav Halchenko yoh at onerussian.com
Fri May 18 23:00:03 BST 2018

My guess is that it is your column name 5988 in your file... You found a limitation that attribute shouldn't start with a number. Prefix it with some literal (eg "unknown5988" :-) )

On May 18, 2018 2:35:09 PM EDT, William Graves <william.wyatt.graves at gmail.com> wrote:
>Dear PyMVPA experts,
>In setting up an RSA analysis, I’m tying to load an attributes file,
>using this command:
>attr = SampleAttributes(os.path.join(path, attrfile),
>literallabels=True, header=True)
>It works fine for a relatively small attributes file, where each row is
>a word, and each column is a feature/attribute of that word, and there
>are less than 2000 columns. But what I want is to load a very sparse
>set of attributes, with 8030 columns, most (but not all) of which have
>a value of 0. When I use the exact same command but substitute the
>larger attributes file, I get this error message:
>In [33]: attr = SampleAttributes(os.path.join(path, attrfile),
>literallabels=True, header=True)
>  File "<string>", line 1
>SampleAttributes.5988 = property(fget=lambda self:
>                        ^
>SyntaxError: invalid syntax
>I’m not sure where the “5988” is coming from. Is that hard coded in
>PyMPVA? I’d appreciate any help you can give.
>William W. Graves, Ph.D.
>Assistant Professor, Department of Psychology
>Rutgers, The State University of New Jersey
>Smith Hall, Room 337
>101 Warren Street, Newark, NJ  07102
>Voice: 973-353-3947
>Fax: 973-353-1171
>Pkg-ExpPsy-PyMVPA mailing list
>Pkg-ExpPsy-PyMVPA at alioth-lists.debian.net

Sent from a phone which beats iPhone.

More information about the Pkg-ExpPsy-PyMVPA mailing list