<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Le 08/20/2010 08:40 AM, Chaitanya kumar CH a écrit :
<blockquote
cite="mid:AANLkTimjaCeuBH_K=YdWNPp_xy5g2px9pFMWpo+g_=z8@mail.gmail.com"
type="cite">Fabrice,<br>
<br>
Can you pin point the code lines that are giving the error
messages?<br>
</blockquote>
<br>
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 ...<br>
<br>
Thanks<br>
<blockquote
cite="mid:AANLkTimjaCeuBH_K=YdWNPp_xy5g2px9pFMWpo+g_=z8@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">On Fri, Aug 20, 2010 at 11:39 AM, Fabrice
LALLAURET - PSV <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:fabrice.lallauret@external.thalesgroup.com">fabrice.lallauret@external.thalesgroup.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">Â 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).<br>
<br>
src_filename  = "src.tif"<br>
dst_filename = "dest.tif"<br>
<br>
# ensure no dest file exists<br>
if os.path.exists(dst_filename):<br>
  os.unlink(dst_filename)<br>
<br>
src_ds = gdal.Open( src_filename  )<br>
driver = gdal.GetDriverByName('GTiff')<br>
src_ds = gdal.Open( src_filename )<br>
dst_ds = driver.CreateCopy( dst_filename, src_ds, 0, [
'TILED=YES', 'COMPRESS=PACKBITS' ] )<br>
<br>
# Once we're done, close properly the dataset<br>
dst_ds = None<br>
src_ds = None<br>
<br>
The src.tif is correctly copied in dest.tif but the console
messages are:<br>
<br>
#>python test.py<br>
dest.tif: No such file or directory<br>
GTIFF_RAW:dest.tif: No such file or directory<br>
#><br>
<br>
What is wrong with this code  or how to eliminate these error
messages which aren't useful and may be a bit misleading ?<br>
<br>
Best Regards<br>
<br>
</blockquote>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
.--. 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: <a class="moz-txt-link-abbreviated" href="mailto:fabrice.lallauret@external.thalesgroup.com">fabrice.lallauret@external.thalesgroup.com</a>
"Power corrupts. PowerPoint corrupts absolutely."
My personnal (french) Websites: <a class="moz-txt-link-freetext" href="http://www.xbee.net">http://www.xbee.net</a>
and <a class="moz-txt-link-freetext" href="http://www.french-comics-zone.fr.st">http://www.french-comics-zone.fr.st</a>
</pre>
</body>
</html>