[GeoNode-devel] Unable to use OWSLib get_schema function when the permission's layer is not viewable from Anyone

Dimitris Karakostis karakostis.dimitris at gmail.com
Thu Sep 22 04:51:30 PDT 2016

I use OWSLib (0.12.0) to retrieve the schema of a layer from Geoserver:

   wfs = WebFeatureService(location, version='1.1.0')
   schema = wfs.get_schema(name_of_layer)

This works fine as long as the checkbox: Anyone (in the permissions modal:
Who can view it tab)  for this layer is selected.
If I uncheck the checkbox I get an error related to:

    schema = wfs.get_schema(name_of_layer)

I also tried to pass authentication parameters to the WebFeatureService as
described here (https://goo.gl/ffpHg7) but this doesn't
seem to fix the issue.

This is the error I get:

in get_response
  112.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/home/vagrant/geonode/geonode/layers/views.py" in layer_edit_data
  1171.     schema = wfs.get_schema(name)
in get_schema
  157.         return get_schema(self.url, typename, self.version)
in get_schema
  40.     res = openURL(url, timeout=timeout)
in openURL
  213.             raise

Exception Type: ServiceException at
Exception Value:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160922/c43e2d15/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-09-22 at 1.38.52 PM.png
Type: image/png
Size: 53873 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160922/c43e2d15/attachment-0001.png>

More information about the geonode-devel mailing list