Hi Martin, <br><br>now the modules import is done by the following lines:<br><i>from tools import GdalTools_utils as Utils<br>from tools import ( doBuildVRT, doContour, doRasterize, doPolygonize, doMerge, doSieve, doProximity, doNearBlack )<br>
from tools import ( doWarp, doGrid, doTranslate, doClipper, doInfo, doProjection, doOverview, doRgbPct, doPctRgb )<br>from tools import ( doSettings, doAbout )</i><br><br>and GdalTools works fine until I reload it. <br>In fact, If I reload it I get this error:<br>
<br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">Traceback (most recent call last):<br> File "/usr/lib/python2.6/dist-packages/qgis/utils.py", line 150, in startPlugin<br> plugins[packageName] = package.classFactory(iface)<br>
File "/usr/local/share/qgis/python/plugins/GdalTools/__init__.py", line 30, in classFactory<br> from GdalTools import GdalTools<br> File "/usr/lib/python2.6/dist-packages/qgis/utils.py", line 291, in _import<br>
mod = _builtin_import(name, globals, locals, fromlist, level)<br> File "/usr/local/share/qgis/python/plugins/GdalTools/GdalTools.py", line 42, in <br> raise ImportError( error_str )<br>ImportError: cannot import name doBuildVRT</p>
<p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">I tried to change all the import lines, using i.e.<br></p><p style="margin: 0px; text-indent: 0px;"><i>import tools.doBuildVRT as doBuildVRT <br>
</i></p><p style="margin: 0px; text-indent: 0px;">but nothing. <br></p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">How can I resolve it? I guess this error it's not related with GdalTools... <br>
</p><p style="margin: 0px; text-indent: 0px;"></p><br>Cheers.<br><br><div class="gmail_quote">On Tue, Jun 8, 2010 at 1:26 PM, Borys Jurgiel <span dir="ltr"><<a href="mailto:borysiasty@aster.pl">borysiasty@aster.pl</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;">Dnia wtorek, 8 czerwca 2010 o 13:07:53 Giuseppe Sucameli napisał(a):<br>
<div><div></div><div class="h5">> Hi Borys,<br>
><br>
> On Mon, Jun 7, 2010 at 10:39 PM, Borys Jurgiel <<a href="mailto:borysiasty@aster.pl">borysiasty@aster.pl</a>> wrote:<br>
> > if QGis.QGIS_VERSION[2] < 5:<br>
> > [set paths and install the local translator]<br>
><br>
> I'm not sure the code above works always.<br>
> When the QGis'll become 2.0 that condition still works? AFAIK it won't.<br>
><br>
> Regards.<br>
<br>
</div></div>Right, it seems the API changes won't be so huge to block all the 1.x plugins<br>
by default, so they can be prepared for 2.0. So you can use:<br>
<br>
Gis.QGIS_VERSION[0:3] < '1.5'<br>
<br>
(sorry for previous mistake, it returns a string, not an int)<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br>