Closed JamesSample closed 3 months ago
My bad. I developed and tested only in a Linux environment where there is (basically) no file path limit. Of course it fails due to the Windows file name limit of 254 characters.
I've opened a PR to fix this, like you said it's just a matter of reversing the order of the if-check
If you need an urgent fix, you can install from my branch:
pip install git+https://github.com/iboates/geoserver-rest.git@fix-long-xml-file-name-crash#egg=geoserver-rest
@JamesSample could you confirm that the fix works using the master branch? It was merged in https://github.com/gicait/geoserver-rest/pull/149
If it is then @iamtekson this issue can be closed.
Thanks @iboates and @iamtekson. This fixes the issue for me.
I'm trying to use the functionality recently introduced in v2.7.0, where
geo.upload_style
can accept XML instead of an SLD file path (I think this was added about 2 months ago in this commit).However, when passed long XML, the line here fails with
A possible solution could be to try validating the XML first?
Thanks for a very useful package! :-)