Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

WFS format incompatible with OGR data source ('list' object has no attribute 'split') #15

@IamJeffG

Description

@IamJeffG

First, FeatureServer.DataSource.OGR:__init__ parses the attribute_cols here.
Then, vectorformats.Formats.WFS tries to parse them again here.

A very basic WFS query:

http://localhost:8080/?SERVICE=WFS&VERSION=1.0.0&TYPENAME=states&BBOX=-122.77458907062643334,47.22724615119393832,-121.86953238113640907,47.96610480588739023&REQUEST=DescribeFeatureType

results in an error:

An error occurred: 'list' object has no attribute 'split'
  File "featureserver/web_request/handlers.py", line 147, in wsgi
    accepts = accepts )
  File "featureserver/FeatureServer/Server.py", line 222, in dispatchRequest
    return getattr(request, request.actions[0].request.lower())(version)
  File "featureserver/FeatureServer/Service/WFS.py", line 62, in describefeaturetype
    result = wfs.describefeaturetype()
  File "featureserver/vectorformats/Formats/WFS.py", line 312, in describefeaturetype
    root = self.addDataSourceFeatureType(root, self.datasources[self.layers[0]])
  File "featureserver/vectorformats/Formats/WFS.py", line 339, in addDataSourceFeatureType
    for attribut_col in datasource.attribute_cols.split(','):

The other formats (e.g. HTML, GeoJSON) work just fine with OGR. This suggests that WFS should not be attempting to parse the attributes. However, when I monkey-patch that fix, it only leads to deeper errors around OGR:getAttributeDescription not being overridden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions