mbtiles no metadata table error

463 views
Skip to first unread message

Carl Sack

unread,
Apr 28, 2014, 7:37:06 PM4/28/14
to tiles...@googlegroups.com
Hi--

I'm a complete noob trying to set up a tile server for the first time. So far I've gotten TileStache installed on my Windows machine and running, but where I've hit the wall is in getting a server error when I try to load up a test image. Please go gentle on me and explain the obvious--as I said, I'm totally new at this.

Here is my .cfg file:

{
  "cache": { "name": "Test" },
  "layers": {
    "tiles": {
      "provider": {
        "name": "mbtiles",
        "tileset": "Floor4_Apr3_1.mbtiles"
      }
    }
  }
}

I'm keeping both the config file and the .mbtiles file in the examples folder within the TileStache-1.49.8 directory. The URL I'm using to access is http://localhost:8070/tiles/18/0/0.png (I set my socket to 8070 to avoid conflicts with other dev servers on my machine; also my tileset was made in Tilemill with zoom levels 18-22). When I try to load this, I get the following error printed in the command shell: 

  File "C:\Python27\lib\site-packages\TileStache\MBTiles.py", line 157, in get_tile
    format = db.execute("SELECT value FROM metadata WHERE name='format'").fetchone()
OperationalError: no such table: metadata

I know the server is running and get a different error when I just give it the wrong URL string. What am I doing wrong here? The tileset works on a Mapbox hosting account; could it be missing something? I feel like there's something simple and obvious here that I'm not getting.

Thanks
-Carl

Jesse Crocker

unread,
Apr 30, 2014, 11:13:54 AM4/30/14
to tiles...@googlegroups.com
Hi Carl,
There are two things that could be going on here, your MBTiles file could be lacking a metadata table, or tilestache is not finding the mbtiles file. Im guessing it’s not finding the file. Can you try giving it the full path to the file, not just the name of the file?

To verify that the mbtiles file is valid, and has a metadata table you could open it up with a sqlite client, either on the command line, or with a graphical tool such as http://sqlitebrowser.sourceforge.net/  It should contain several tables, including a table named metadata.

-
Jesse

--
You received this message because you are subscribed to the Google Groups "Tilestache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages