[Numpy-discussion] at my wits end over an error message...

Robert Kern robert.kern at gmail.com
Wed Sep 3 15:40:31 EDT 2008


On Sat, Aug 30, 2008 at 22:10, Zachary Pincus <zachary.pincus at yale.edu> wrote:
> Hi Alan,
>
>> Traceback (most recent call last):
>>  File "/usr/local/lib/python2.5/site-packages/enthought.traits-2.0.4-
>> py2.5-linux-i686.egg/enthought/traits/trait_notifiers.py", line 325,
>> in call_1
>>    self.handler( object )
>>  File "TrimMapl_1.py", line 98, in _Run_fired
>>    outdata = np.array(outdata, dtype=dtypes)
>> TypeError: expected a readable buffer object
>
> This would make it appear that the problem is not with numpy per se,
> but with the traits library, or how you're using it... I'm not too
> familiar with traits, so I can't really provide any advice there.

Probably not. While Traits triggers the execution of the failing code,
the last line is pure numpy, and the error message comes from
numpy.array(). You then do what one normally does to debug a TypeError
being thrown by a function: find out the type and value of the inputs
being given to the function either by print statements or a debugger.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco



More information about the NumPy-Discussion mailing list