Created
April 5, 2010 03:54
-
-
Save satra/355998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [21]: class A(HasTraits): | |
foo = Either(File(exists=True), List(File(exists=True))) | |
In [23]: a.foo = '/software/temp/volumecompare.png' | |
In [25]: a.foo = glob('/software/temp/*.png') | |
ERROR: An unexpected error occurred while tokenizing input | |
The following traceback may be corrupted or invalid | |
The error message is: ('EOF in multi-line statement', (3, 0)) | |
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
/software/temp/nipype-tutorial/temp/<ipython console> in <module>() | |
/Library/Python/2.6/site-packages/Traits-3.3.1-py2.6-macosx-10.6-universal.egg/enthought/traits/trait_handlers.pyc in validate(self, object, name, value) | |
2089 except TraitError: | |
2090 pass | |
-> 2091 return self.slow_validate( object, name, value ) | |
2092 | |
2093 def slow_validate ( self, object, name, value ): | |
/Library/Python/2.6/site-packages/Traits-3.3.1-py2.6-macosx-10.6-universal.egg/enthought/traits/trait_handlers.pyc in slow_validate(self, object, name, value) | |
2094 for validate in self.slow_validates: | |
2095 try: | |
-> 2096 return validate( object, name, value ) | |
2097 except TraitError: | |
2098 pass | |
/Library/Python/2.6/site-packages/Traits-3.3.1-py2.6-macosx-10.6-universal.egg/enthought/traits/trait_types.pyc in validate(self, object, name, value) | |
1407 return super( BaseFile, self ).validate( object, name, value ) | |
1408 | |
-> 1409 if isfile( value ): | |
1410 return value | |
1411 | |
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/genericpath.pyc in isfile(path) | |
27 """Test whether a path is a regular file""" | |
28 try: | |
---> 29 st = os.stat(path) | |
30 except os.error: | |
31 return False | |
TypeError: coercing to Unicode: need string or buffer, list found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment