[Gdal-dev] StandardError: 'NoneType' object has no attribute '_o'

sandricionut sandricionut at yahoo.com
Wed Sep 5 15:29:40 EDT 2007


Hi:
I am using Gdal 142 version on Windows XP sp2 with Numeric-24.2,
numarray-1.5.1 for Python 2.4.
I want to use genericfunctions from numarray. I have tried to use the
example provided in numarray users' manual release 1.5:
>>> def fnc(iline, oline):
... oline[...] = iline[:-2] + 2 * iline[1:-1] + 3 * iline[2:]
...
>>> print generic_filter1d(a, fnc, 3)
[[ 3 8 14 17]
[27 32 38 41]
[51 56 62 65]]

Everything works OK and I get the proper result, but when I try to use
gdalnumeric to save the array to a image format (tif for example, or any
other format supported by gdal) I get the following error:

  File "C:\Python24\Lib\site-packages\gdalnumeric.py", line 123, in
SaveArray
    return driver.CreateCopy( filename, OpenArray(src_array,prototype) )
  File "C:\Python24\Lib\site-packages\gdal.py", line 592, in CreateCopy
    target_ds = _gdal.GDALCreateCopy( self._o, filename, source_ds._o,
StandardError: 'NoneType' object has no attribute '_o'

I don't know what I do wrong

Thank you

Ionut
-- 
View this message in context: http://www.nabble.com/StandardError%3A-%27NoneType%27-object-has-no-attribute-%27_o%27-tf4383687.html#a12496782
Sent from the GDAL - Dev mailing list archive at Nabble.com.




More information about the Gdal-dev mailing list