[postgis-users] GTK-Warning, when opening a database

"Daniela Stärke" daniela.staerke at gmx.de
Tue Jul 10 07:43:55 PDT 2007

Hi everyone,

I have mezogis with all its requirements installed but now when I try to load/open a database I recieve the following message:

usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py:527: GtkWarning: Using Cairo rendering requires the drawable argument to
have a specified colormap. All windows have a colormap,
however, pixmaps only have colormap by default if they
were created with a non-NULL window argument. Otherwise
a colormap must be set on them with gdk_drawable_set_colormap
  self.ctx = self.pixmap.cairo_create()
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_pane_db.py", line 525, in __on_doubleclick
    self.pgbutler.runQuery('SELECT * FROM %s'%table.getSQL())
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 400, in runQuery
    self.showResults(cursor, query, layer, resultset, tablelist)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 434, in showResults
    mapview = openMapView(layer.resultset)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guiwindows.py", line 33, in openMapView
    m = MapWindow(resultset)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guiwindows.py", line 139, in __init__
    self.canvas = MapCanvas()
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py", line 86, in __init__
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py", line 527, in __createNewCanvas
    self.ctx = self.pixmap.cairo_create()
cairo.Error: NULL pointer

In the source code I made some print-commands, to see how far the program goes and there I saw, that mezogis goes in the file _canvas.py and also in the function " def __createNewCanvas(self): ". But then, when mezogis should show the extend (with a print command) of the table, I get height: 1 and width: 1. And this can't be right, because my database is filled with geodata of the world, and this extend can't be just 1. 

Something must be wrong with the line:

aw = self.mapframe.get_allocation()
because afterwards the height and width is set, and with print I get the extend of 1, like I said.
The get_allocation command is a method of python, or what does it do???  I ask, because in no other file this method is used (ok, just in one of _guiwindows.py, but there, the line is commented out).

When I use the SQL-command (Select * from "public"."dbname" )to show me the content of the database I get the messages which I wrote above.
The program is able to show all data in a table, except from the geometry-column. But actually I wanted a map created, which looks like a worldmap and with which I could work, but without mezogis is quit useless for me.

What could I do, to work properly with mezogis???

Thanks in advance for your help


GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

More information about the postgis-users mailing list