<div>Hello members:</div>
<div> </div>
<div>I&#39;m starting an script for geospatial information using python and gdal binaries, but I have problems saving the data I get into an excel shee. At the beginning I thought it was because the characters the files have for some records, but I run the code in a way it saves the path for each file I&#39;m looking for. The script throws th error:</div>

<div>Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on<br>win32<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; import imagen<br>
Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>  File &quot;imagen.py&quot;, line 20, in &lt;module&gt;<br>    wrkbk.save(&#39;imagen.xls&#39;)<br>  File &quot;C:\Python26\lib\site-packages\xlwt\Workbook.py&quot;, line 634, in save<br>
    doc.save(filename, self.get_biff_data())<br>  File &quot;C:\Python26\lib\site-packages\xlwt\Workbook.py&quot;, line 609, in get_biff_d<br>ata<br>    shared_str_table   = self.__sst_rec()<br>  File &quot;C:\Python26\lib\site-packages\xlwt\Workbook.py&quot;, line 571, in __sst_rec<br>
    return self.__sst.get_biff_record()<br>  File &quot;C:\Python26\lib\site-packages\xlwt\BIFFRecords.py&quot;, line 53, in get_biff<br>_record<br>    self._add_to_sst(s)<br>  File &quot;C:\Python26\lib\site-packages\xlwt\BIFFRecords.py&quot;, line 66, in _add_to_<br>
sst<br>    u_str = upack2(s, self.encoding)<br>  File &quot;C:\Python26\lib\site-packages\xlwt\UnicodeUtils.py&quot;, line 50, in upack2<br>    us = unicode(s, encoding)<br>UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0xf3 in position 49: ordinal<br>
 not in range(128)<br>&gt;&gt;&gt;</div>
<div>My code is:</div>
<div>import os, time, socket<br>from xlwt import Workbook<br>from osgeo import gdal<br>from osgeo.gdalconst import *<br>from PIL import Image</div>
<div><br>gdal.AllRegister()<br>file_list = []<br>folders = None<br> # look in this (root) folder for files with specified extension<br>for root, folders, files in os.walk( &quot;C:\\&quot; ):<br> file_list.extend(os.path.join(root,fi) for fi in files if fi.endswith(&quot;.tif&quot;) or fi.endswith(&quot;.tiff&quot;) or fi.endswith(&quot;.gtif&quot;) or fi.endswith(&quot;.ecw&quot;) or fi.endswith(&quot;.bil&quot;) or fi.endswith(&quot;.til&quot;) or fi.endswith(&quot;.jpeg&quot;))<br>
wrkbk = Workbook()<br>wksht = wrkbk.add_sheet(&#39;rasters&#39;) <br>wksht.row(0).write(0,&#39;ruta&#39;)<br>for row, filepath in enumerate(file_list, start=1): <br> #Llenar lista de archivos y ruta<br> wksht.row(row).write(0, filepath)<br>
wrkbk.save(&#39;imagen.xls&#39;)</div>
<div> </div>
<div>Is there a way I can manage this error?</div>