Skip to content

Fix errors for requests to specific WFS#58

Open
mholthausen wants to merge 7 commits intomainfrom
fix-errors
Open

Fix errors for requests to specific WFS#58
mholthausen wants to merge 7 commits intomainfrom
fix-errors

Conversation

@mholthausen
Copy link
Member

@mholthausen mholthausen commented Mar 20, 2026

This PR fixes four issues in superset_wfs_dialect that caused errors in superset when loading and cross-filtering charts based on specific WFS.

  • WfsDialect.dbapi() and WfsDialect.import_dbapi() now return the concrete wfs_dbapi object from base.py and avoid errors like module 'superset_wfs_dialect' has no attribute 'paramstyle'
  • filtered POST GetFeature requests now explicit UTF-8 payload so that cross-filter values containing special characters (e.g. Einschränkungen, Fußgängerverkehr) are transmitted correctly and no longer produce empty results. This fixes [Bug]: Crossfilter UTF-8 encoding/decoding issue #52 (46a0ca1).
  • We keep [Bug]: COUNT funktioniert nicht auf bestimmtem WFS #53 open for follow-up discussion/decision on service fix vs. client-side workaround. This issue is not closed by this PR. The root cause is invalid JSON from WFS (trailing comma in geometry).
  • if a WFS server ignores JSON output on POST and returns XML/GML, the dialect automatically retries using GET. This prevents JSON parsing failures such as unexpected character: line 1 column 1 caused by attempting to parse XML as JSON. This is a fallback. Requests may fail for long or complex filters (e.g. due to URL length). The root cause is a misconfiguration of the requested WFS service, which returns XML/GML instead of JSON for POST GetFeature despite requesting JSON (needs to be discussed). We keep [Bug]: Crossfilter funktioniert nicht auf bestimmtem WFS #54 open as this feature needs to be discussed further (46d5a85)

In addition, the README file will be updated to include instructions for integrating the dialect module into a superset development environment (372ded3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Crossfilter UTF-8 encoding/decoding issue

1 participant