[Nipy-devel] help with attributes

Jonathan Taylor jonathan.taylor at stanford.edu
Wed May 17 18:59:11 CDT 2006


hi all,

need some help with attributes error message: i tried attached pca.py 
(in lib/neuroimaging/statistics) example and got the following error:

thanks,

jonathan

--------------------
Traceback (most recent call last):
  File "pca.py", line 177, in ?
    a = p.components(which=[0,2,3])
  File "pca.py", line 109, in components
    outgrid = self.image.grid.subgrid(0)
  File 
"/home/jtaylo/python/lib/python2.4/site-packages/neuroimaging/fmri/__init__.py", 
line 99, in subgrid
    _grid.labelset = self.labelset
  File "/home/jtaylo/python/lib/python2.4/site-packages/attributes.py", 
line 256, in set
    self.validate(value)
  File "/home/jtaylo/python/lib/python2.4/site-packages/attributes.py", 
line 211, in validate
    if not self.isvalid(value): raise ProtocolOmission(
protocols.ProtocolOmission: attribute labelset implements (<class 
protocols.Sequence at 0xb6ac62fc>,), value set([]) of type <type 'set'> 
does not implement: ('__getitem__', '__getslice__')

-----------------------

p.s. does attribute offer the same thing traits does? if yes, should we 
be using both? i am kind of used to traits by now...

-- 
------------------------------------------------------------------------
I'm part of the Team in Training: please support our efforts for the
Leukemia and Lymphoma Society!

http://www.active.com/donate/tntsvmb/tntsvmbJTaylor

GO TEAM !!!

------------------------------------------------------------------------
Jonathan Taylor                           Tel:   650.723.9230
Dept. of Statistics                       Fax:   650.725.8977
Sequoia Hall, 137                         www-stat.stanford.edu/~jtaylo
390 Serra Mall
Stanford, CA 94305

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pca.py
Type: text/x-python
Size: 5861 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/nipy-devel/attachments/20060517/54d101a0/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jonathan.taylor.vcf
Type: text/x-vcard
Size: 329 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/nipy-devel/attachments/20060517/54d101a0/attachment.vcf 


More information about the Nipy-devel mailing list