<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">OS: windows7 x86</span></font><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">
grass: grass-7.0.SVN native build</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">WinGRASS-7.0.SVN-r47191-1-Setup.exe</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">
<br><br></div><div><div><font class="Apple-style-span" face="arial, sans-serif"><div><span class="Apple-style-span" style="border-collapse: collapse;">import os</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">import sys</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">gbase = os.getenv("GISBASE") </span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">pypath = os.path.join(gbase,'etc','gui','wxpython','gui_modules')</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">sys.path.append(pypath)</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">pypath = os.path.join(gbase,'etc','python')</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">sys.path.append(pypath)</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">import globalvar</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">grassPath = os.path.join(globalvar.ETCDIR, "python")</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">sys.path.append(grassPath)</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">from grass.lib import gis as grasslib</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">from grass.lib import raster as raster</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">cellhd = grasslib.Cell_head()</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">if (raster.Rast_get_cellhd('lsat5_1987_20', 'landsat', cellhd))!=0 :</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> print "error1"</span></div>
<div style="border-collapse: collapse; "><br></div><div style="border-collapse: collapse; "><br></div><div style="border-collapse: collapse; ">error log:</div></font><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; "> -> if (raster.Rast_get_cellhd('lsat5_1987_20', 'landsat', cellhd))!=0 :</span></div>
</div>WindowsEror: exception: access violation writing 0x0000000<br>-- <br><div>Thanks && Regards</div>Rashad<br>