Thanks for the tips, Duncan!<br>I've written a quick fix for the problem. It was just an error catching that I missed.<br>Now you can probably see the error message when the plugin loads and then choose the right database connection.<br>
Thanks for the help!<br>Mauricio de Paulo<br><br><div class="gmail_quote">2011/6/14 Duncan Golicher <span dir="ltr"><<a href="mailto:dgolicher@gmail.com">dgolicher@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am connecting to a database called "test" when loading vector data<br>
and this has the raster data in. I don't have a database called global<br>
(anymore). Where do I find the connection string? This message comes<br>
up before the plugin asks me to make a connection at all.<br>
<div><div></div><div class="h5"><br>
<br>
2011/6/14 Maurício de Paulo <<a href="mailto:mauricio.dev@gmail.com">mauricio.dev@gmail.com</a>>:<br>
> It's telling you that the database named Global doesn't exist. Any idea why?<br>
> Can you send me your connection string (hide the password, please).<br>
><br>
> 2011/6/14 Duncan Golicher <<a href="mailto:dgolicher@gmail.com">dgolicher@gmail.com</a>><br>
>><br>
>> I am using PostGIS 2.0 on Postresql 8.4<br>
>><br>
>> This is the error message I get<br>
>><br>
>> An error has occured while executing Python code:<br>
>><br>
>> Traceback (most recent call last):<br>
>>  File "/home/duncan/.qgis/python/plugins/wktraster/wktRaster.py",<br>
>> line 85, in callAddLayer<br>
>>    dlg = DlgAddRasterLayer()<br>
>>  File "/home/duncan/.qgis/python/plugins/wktraster/DlgAddRasterLayer.py",<br>
>> line 36, in __init__<br>
>>    self.listTables(0)<br>
>>  File "/home/duncan/.qgis/python/plugins/wktraster/DlgAddRasterLayer.py",<br>
>> line 50, in listTables<br>
>>    tables=conn.listTables(self,connstring) #returns a list of pairs<br>
>> (index, value)<br>
>>  File "/home/duncan/.qgis/python/plugins/wktraster/conn.py", line 47,<br>
>> in listTables<br>
>>    db =<br>
>> GeoDB(host=parmlist[2].split("=")[1],dbname=parmlist[1].split("=")[1],user=parmlist[3].split("=")[1],passwd=parmlist[4].split("=")[1],port=int(parmlist[5].split("=")[1]))<br>

>>  File "/home/duncan/.qgis/python/plugins/wktraster/postgis_utils.py",<br>
>> line 134, in __init__<br>
>>    raise DbError(e)<br>
>> DbError: FATAL:  database "Global" does not exist<br>
>><br>
>><br>
>> Python version:<br>
>> 2.6.5 (r265:79063, Apr 16 2010, 13:28:26)<br>
>> [GCC 4.4.3]<br>
>><br>
>><br>
>> QGIS version:<br>
>> 1.7.0-Wroclaw Wroclaw, exported<br>
>><br>
>> Python path: ['/home/duncan/.qgis/python/plugins/GeoCoding',<br>
>> '/home/duncan/.qgis/python/plugins/GeoCoding',<br>
>> '/usr/share/qgis/python', '/home/duncan/.qgis/python',<br>
>> '/home/duncan/.qgis/python/plugins', '/usr/share/qgis/python/plugins',<br>
>> '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',<br>
>> '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',<br>
>> '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',<br>
>> '/usr/lib/python2.6/dist-packages/PIL',<br>
>> '/usr/lib/python2.6/dist-packages/gst-0.10',<br>
>> '/usr/lib/pymodules/python2.6',<br>
>> '/usr/lib/python2.6/dist-packages/gtk-2.0',<br>
>> '/usr/lib/pymodules/python2.6/gtk-2.0',<br>
>> '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode',<br>
>> '/usr/local/lib/python2.6/dist-packages',<br>
>> '/home/duncan/.qgis/python/plugins/mmqgis/forms',<br>
>> '/home/duncan/.qgis/python/plugins/fTools/tools']<br>
>><br>
>><br>
>><br>
>><br>
>> 2011/6/14 Maurício de Paulo <<a href="mailto:mauricio.dev@gmail.com">mauricio.dev@gmail.com</a>>:<br>
>> > Hi Duncan,<br>
>> > I've recently upgraded the plugin to start working with gdal 1.8. This<br>
>> > version does not work with gdal 1.7.<br>
>> > I can try to write a workaround for this, but I don't see a reason as<br>
>> > gdal<br>
>> > 1.8 is the first version to actually load and show data without bugs.<br>
>> > The qgis 1.7 from ubuntugis stable repository is compiled against gdal<br>
>> > 1.8.<br>
>> > I wouldn't advise anyone that want to use postgis raster to use versions<br>
>> > without gdal 1.8 for the reasons mentioned.<br>
>> ><br>
>> > I need to investigate why the qgis 1.7 with gdal 1.8 is not working.<br>
>> > Could<br>
>> > you send me the error message? I've tested here and it works fine. I've<br>
>> > ran<br>
>> > into some issues while testing when trying to view data loaded before<br>
>> > the<br>
>> > gdal update.<br>
>> > My tests were made with postgis 2.0 from trunk. What are you using?<br>
>> ><br>
>> > Thanks for helping!<br>
>> > Mauricio de Paulo<br>
>> ><br>
>> > 2011/6/14 Duncan Golicher <<a href="mailto:dgolicher@gmail.com">dgolicher@gmail.com</a>><br>
>> >><br>
>> >> Hello Mauricio,<br>
>> >><br>
>> >> I am using Qgis version 1.8-Trunk built against code revision exported<br>
>> >> GDAL/OGR version 1.6.3<br>
>> >><br>
>> >> Maybe, I should go back down a  version but I do have version 1.7<br>
>> >> running on my desktop PC. In this case the add a raster layer python<br>
>> >> code exits with errors in line 85,36 50 and 134. I could get raster<br>
>> >> layers from Postgis when using QGIS 1.6, but not load them and QGIS<br>
>> >> 1.6 had a bug that led to crashes when rendering some raster layers.<br>
>> >><br>
>> >> Thanks for looking at this,<br>
>> >><br>
>> >> Duncan<br>
>> >><br>
>> >> 2011/6/14 Maurício de Paulo <<a href="mailto:mauricio.dev@gmail.com">mauricio.dev@gmail.com</a>>:<br>
>> >> > Hi Ducan,<br>
>> >> > I don't know what repositories you are using.<br>
>> >> > I've tested on ubuntugis repository with qgis 1.7.<br>
>> >> > You can check what's the version qgis is compiled against by the<br>
>> >> > Help-About-About menu on qgis.<br>
>> >> > There should be a line telling the ogr/gdal version there.<br>
>> >> > Could you give me more information about this issue?<br>
>> >> > Thanks for helping me.<br>
>> >> > Mauricio de Paulo<br>
>> >> ><br>
>> >> > On Tue, Jun 14, 2011 at 9:45 AM, Duncan Golicher<br>
>> >> > <<a href="mailto:dgolicher@gmail.com">dgolicher@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Thanks for developing the QGIS raster plugin. I had it running with<br>
>> >> >> QGIS 1.6 but since updating to 1.8 from trunk I cannot get it to<br>
>> >> >> work<br>
>> >> >> with Gdal on Ubuntu Lucid.<br>
>> >> >><br>
>> >> >> Message ...<br>
>> >> >><br>
>> >> >> GDAL version incompatible with WktRaster.<br>
>> >> >>  Your QGIS found GDAL version 1630<br>
>> >> >><br>
>> >> >> I have the latest version of gdal.1.8 and I have tried removing and<br>
>> >> >> reinstalling all components several times.<br>
>> >> >><br>
>> >> >> Any thoughts on the cause of the problem?<br>
>> >> >><br>
>> >> >><br>
>> >> >> Duncan<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > Mauricio de Paulo<br>
>> >> > Engenheiro Cartografo<br>
>> >> > MapeandoOBrasil<br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Mauricio de Paulo<br>
>> > Engenheiro Cartografo<br>
>> > MapeandoOBrasil<br>
>> ><br>
>> ><br>
><br>
><br>
><br>
> --<br>
> Mauricio de Paulo<br>
> Engenheiro Cartografo<br>
> MapeandoOBrasil<br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mauricio de Paulo<br>Engenheiro Cartografo<br><a href="http://mapeandoobrasil.blogspot.com" target="_blank">MapeandoOBrasil</a><br><br>