[gdal-dev] unwanted error message
Fabrice LALLAURET - PSV
fabrice.lallauret at external.thalesgroup.com
Fri Aug 20 03:33:00 EDT 2010
Le 08/20/2010 08:40 AM, Chaitanya kumar CH a écrit :
> Fabrice,
>
> Can you pin point the code lines that are giving the error messages?
Oops, after compare the result of my script on several platforms (linux
with my compiled gdal/windows with my compiled gdal and fwtools) I've
found that this is my GDAL_DRIVER_PATH environment variable which cause
the problem. I'll check why ...
Thanks
>
> On Fri, Aug 20, 2010 at 11:39 AM, Fabrice LALLAURET - PSV
> <fabrice.lallauret at external.thalesgroup.com
> <mailto:fabrice.lallauret at external.thalesgroup.com>> wrote:
>
> Â 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
andhttp://www.french-comics-zone.fr.st
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100820/2bf76c7f/attachment-0001.html
More information about the gdal-dev
mailing list