I've tried to write some gdal python scripts but in some case I've got unwanted error message. Here is a small example (from gdal tutorial).

src_filename  = "src.tif"
dst_filename = "dest.tif"

# ensure no dest file exists
if os.path.exists(dst_filename):
    os.unlink(dst_filename)

src_ds = gdal.Open( src_filename  )
driver = gdal.GetDriverByName('GTiff')
src_ds = gdal.Open( src_filename )
dst_ds = driver.CreateCopy( dst_filename, src_ds, 0, [ 'TILED=YES', 'COMPRESS=PACKBITS' ] )

# Once we're done, close properly the dataset
dst_ds = None
src_ds = None

The src.tif is correctly copied in dest.tif but the console messages are:

#>python test.py
dest.tif: No such file or directory
GTIFF_RAW:dest.tif: No such file or directory
#>

What is wrong with this code or how to eliminate these error messages which aren't useful and may be a bit misleading ?

Best Regards

--
     .--.    Fabrice LALLAURET - PSV Team
    |o_o |   Tel: (33) (01 34) 22 83 47
    |:_/ |   Thales Training&  Simulation
   //   \ \  1, rue du General de Gaulle
  (|     | ) Z.I. les beaux soleils
 /'\_   _/`\ Osny. B.P. 226
 \___)=(___/ 95523 Cergy-Pontoise Cedex
 E-mail: fabrice.lallau...@external.thalesgroup.com
 "Power corrupts. PowerPoint corrupts absolutely."
 My personnal (french) Websites: http://www.xbee.net
 and http://www.french-comics-zone.fr.st


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to