[Community] PrimaGISDatalayer: trouble with datastores that arenot in the DL folder

Ludwig M Brinckmann ludwigbrinckmann at hotmail.com
Mon Jun 19 12:31:56 EEST 2006


This is what I try:

This is the working version (devexplorer is my hostname for the development 
system for the yunnanexplorer site)

www.devexplorer.com/map    is the map
www.devexplorer.com/map/images is the PG datalayer for the images. If I 
configure the path to the datastore as . and the images are in that folder 
it works fine.

Now, I copy and paste the images to
www.devexplorer.com/geoimages. There are only the images in the folder that 
were in there before (so it is not an issue of running into an object that 
is not a GeoATImage)

Absolute path in the PG datalayer: /geoimages (I can click on the ' Path to 
the data container: /geoimages ' link in the view page for the datalayer and 
it takes me to that folder with the images). But the map will now not show 
any of the images, and the message in the eventlog is

2006-06-19T10:16:51 INFO 
/var/opt/zope/dev/Products/PrimaGIS/PrimaGISDataLayer.py::getDataSource(), 
line 327
Invalid datapath '/geoimages' for images
The view page of the datalayer does not show any of the image symbolizers in 
the preview.

But in general I had tried with a relative path:

Path to the data container: ../../geoimages (two up, one down: the link on 
the datalayer view page takes me to those files. and the preview shows the 
symbolizers, so this seems to be working.)
However, now whenever I activate the layer in the main map view, the map is 
broken and the message in the eventlog is this:

2006-06-19T10:27:05 ERROR Zope.SiteErrorLog 
http://www.devexplorer.com/map/view
Traceback (most recent call last):
  File "/opt/zope/lib/python/ZPublisher/Publish.py", line 113, in publish
    request, bind=1)
  File "/opt/zope/lib/python/ZPublisher/mapply.py", line 88, in mapply
    if debug is not None: return debug(object,args,context)
  File "/opt/zope/lib/python/ZPublisher/Publish.py", line 40, in call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "/var/opt/zope/dev/Products/PrimaGIS/PrimaGISMap.py", line 280, in 
view
    transparent = not(self.getBackgroundColor()))
  File "/var/opt/zope/dev/Products/ZCO/MapRenderer.py", line 174, in render
    layering.append((layer.layer(), style.style()))
  File "/var/opt/zope/dev/Products/PrimaGIS/PrimaGISDataLayer.py", line 158, 
in layer
    return mapping.Layer(self.datastore(), PRIMAGIS_DATALAYER_TYPENAME)
  File "/var/opt/zope/dev/Products/PrimaGIS/PrimaGISDataLayer.py", line 209, 
in datastore
    for item in self.getSpatialData():
  File "/var/opt/zope/dev/Products/PrimaGIS/PrimaGISDataLayer.py", line 339, 
in getSpatialData
    container = self.getDataSource()
  File "/var/opt/zope/dev/Products/PrimaGIS/PrimaGISDataLayer.py", line 325, 
in getDataSource
    return self.unrestrictedTraverse(self.getDataSourcePath())
  File "/opt/zope/lib/python/OFS/Traversable.py", line 209, in 
unrestrictedTraverse
    next=obj[name]
TypeError: unsubscriptable object

I have no idea what the unrestrictedTraverse does, do you think I am running 
into any security or workflow thing here? I am running this as being logged 
in as manager, owner of everything, so I cannot see Zope security blocking 
my access to any of the folders I am traversing.

I had tried different variations of this, such as geoimages being a 
subfolder of images (/images/geoimages), but it does  not make any 
difference.

Ludwig

>From: Kai Hänninen <kai.hanninen at mbconcert.fi>
>Reply-To: "gispython.org community projects" 
><community at lists.gispython.org>
>To: "gispython.org community projects" <community at lists.gispython.org>
>Subject: Re: [Community] PrimaGISDatalayer: trouble with datastores that 
>arenot	in the DL folder
>Date: Sun, 18 Jun 2006 18:59:12 +0300
>
>Ludwig M Brinckmann wrote:
>>Whenever I try to put the objects for a PrimaGISDatalayer into a folder 
>>that isn't ".", I get the following error:
>>
>>Module ZPublisher.Publish, line 113, in publish
>>Module ZPublisher.mapply, line 88, in mapply
>>Module ZPublisher.Publish, line 40, in call_object
>>Module Products.PrimaGIS.PrimaGISMap, line 280, in view
>>Module Products.ZCO.MapRenderer, line 174, in render
>>Module Products.PrimaGIS.PrimaGISDataLayer, line 158, in layer
>>Module Products.PrimaGIS.PrimaGISDataLayer, line 209, in datastore
>>Module Products.PrimaGIS.PrimaGISDataLayer, line 339, in getSpatialData
>>Module Products.PrimaGIS.PrimaGISDataLayer, line 325, in getDataSource
>>Module OFS.Traversable, line 209, in unrestrictedTraverse
>>__traceback_info__: ([], 'geoimages')
>>TypeError: unsubscriptable object
>>
>>The Primagis version used is a recent SVN head revision, but before Kai's 
>>recent symbolizer changes.
>>The data is ok, the folder is accessible (clicking on it will take me 
>>there), the preview works, but the map is broken.
>>
>>Any ideas?
>>
>
>I tried this with the demo map by moving the contents of the European 
>capitals layers a couple of folders up and then providing both an absolute 
>and relative path to the data and both cases worked for me.
>
>What are
>  - the absolute path to the primagis map
>  - the absolute path to the primagis data layer
>  - the value of the "path to the data container" field in the primagis 
>data layer
>
>on your system?
>
>I can try to reproduce this with something similar to your configuration.
>
>--kai
>
>--
>Kai Hänninen                  +358-50-558-7935
>Software engineer             www.mbconcert.fi
>MB Concert Ky                 kai.hanninen at mbconcert.fi
>_______________________________________________
>Community mailing list
>Community at lists.gispython.org
>http://lists.gispython.org/mailman/listinfo/community





More information about the Community mailing list