From: Jeff W. <js...@fa...> - 2005-04-25 00:26:29
|
Mike Elson wrote: >I'm having trouble running some of the examples that come with basemap >- any th\at use the file etopo20.pickle fail with an error similar to: > >Traceback (most recent call last): > File "test.py", line 12, in ? > topodict = cPickle.load(open('etopo20.pickle','rb')) > File "/usr/lib/python2.3/site-packages/numarray/generic.py", line >159, in Cla\ssicUnpickler > self.__setstate__(state) > File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py", >line 463, i\n __setstate__ > self._type = state["_type"] >AttributeError: ("'str' object has no attribute 'name'", <function >ClassicUnpic\kler at 0xb7b08e9c>, (<class >'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize': >4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version': >'1.1', '_byteorder': 'big', '_data': <memory at 082f8798 with >size:43\24 held by object 082f8778 aliasing object 00000000>, >'_strides': (4,)})) > >Can anyone tell me how to fix this? >I'm using python 2.3.4, matplotlib 0.80, basemap 0.3.2, proj 4.4.8 and >have the Python libraries numeric 23.1 and numarray 0.8 installed. > >Thanks in advance, >Mike. > > > Mike: My guess is I saved the data as a pickle Numeric (not numarray) object. You can either install Numeric, or I can re-pickle it for you with numarray. -Jeff --- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |