Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS crashes during the loading of SLD #297

Closed
Gpetrak opened this issue Nov 22, 2024 · 1 comment · Fixed by #298
Closed

QGIS crashes during the loading of SLD #297

Gpetrak opened this issue Nov 22, 2024 · 1 comment · Fixed by #298
Assignees

Comments

@Gpetrak
Copy link
Contributor

Gpetrak commented Nov 22, 2024

QGIS crashes when the user tries to load a layer the WFS. The crash happens in the following line:

https://github.com/GeoNode/QGISGeoNodePlugin/blob/main/src/qgis_geonode/styles.py#L49

Probably the error is related with encoding issues since this that happens only in layers with non-english characters.

@Gpetrak
Copy link
Contributor Author

Gpetrak commented Nov 25, 2024

After more investigation, I realized that the error is not related with encoding issues. The QGIS crashes when the retrieved SLD from GeoServer includes comments especially before the element NamedLayer. Thus to fix the error I had to create a remove_comments_from_sld function, which scans the SLD and removes the comments.
The corresponding PR is available here #298

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 a pull request may close this issue.

2 participants