[gdal-dev] unwanted error message
Fabrice LALLAURET - PSV
fabrice.lallauret at external.thalesgroup.com
Fri Aug 20 02:09:51 EDT 2010
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.lallauret at external.thalesgroup.com
"Power corrupts. PowerPoint corrupts absolutely."
My personnal (french) Websites: http://www.xbee.net
and http://www.french-comics-zone.fr.st
More information about the gdal-dev
mailing list