[Gdal-dev] using the GDAL.open in python

Frank Warmerdam fwarmerdam at gmail.com
Mon Jan 24 12:58:02 EST 2005


On Mon, 24 Jan 2005 18:43:49 +0100, francesco
<francesco.pirotti at unipd.it> wrote:
> Hello,
> 
> I have a file from ASTER satellite which is called "001" and has a metafile
> called "001.met":  if I access to that file with the gdalinfo or
> gdaltranslate utility everything works just fine, but when I use python
> coding my own program, the
> 
> gdal.open(file,  GA_ReadOnly )
> 
> returns None and the error message is that the file 001 is not recognized
> as a supported file format.  How can that be?

Francesco,

Well, the obvious conclusion would be that you have two copies of
GDAL on your system, and when you run the python script you are 
getting a different one than you get with gdalinfo.   Assuming that isn't
the case, I am not sure why you would see the behaviour you do. 

BTW, I am just commiting a change to gdal_translate today so that if you
use the -sds (Sub Data Sets) flag it will copy all the subdatasets to output
files instead of just reporting you need to select a subdataset yourself. 

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list