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

esridump.errors.EsriDownloadError: Could not retrieve a section of features: Unable to complete operation. Unable to complete Query operation. #32

Open
robsalasco opened this issue Feb 9, 2017 · 4 comments

Comments

@robsalasco
Copy link

Hi! Thank you for your great work :) I have this problem with a mapserver. Can you help me please?

robsalasco@leucippus:~/Desktop/FONDECYT_ENVIRONMENT/WMS_CONAF$ esri2geojson http://mapaforestal.infor.cl/ArcGIS/rest/services/20160803_pl_apl/MapServer/6 20160803_pl_apl_6.geojson
2017-02-09 11:43:33,867 - cli.esridump - INFO - Source does not support feature count
Traceback (most recent call last):
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 243, in __iter__
    row_count = self.get_feature_count()
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 124, in get_feature_count
    count_json = self._handle_esri_errors(response, "Could not retrieve row count")
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 76, in _handle_esri_errors
    ', '.join(error['details']),
esridump.errors.EsriDownloadError: Could not retrieve row count: Unable to complete  operation. Unable to complete Query operation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/robsalasco/.pyenv/versions/3.5.2/bin/esri2geojson", line 9, in <module>
    load_entry_point('esridump==1.5.0', 'console_scripts', 'esri2geojson')()
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/cli.py", line 100, in main
    feature = next(feature_iter)
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 256, in __iter__
    for feature in self._scrape_an_envelope(bounds, self._outSR, page_size):
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 222, in _scrape_an_envelope
    features = self._fetch_bounded_features(envelope, outSR)
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 188, in _fetch_bounded_features
    features = self._handle_esri_errors(response, "Could not retrieve a section of features")
  File "/Users/robsalasco/.pyenv/versions/3.5.2/lib/python3.5/site-packages/esridump/dumper.py", line 76, in _handle_esri_errors
    ', '.join(error['details']),
esridump.errors.EsriDownloadError: Could not retrieve a section of features: Unable to complete  operation. Unable to complete Query operation.
@iandees
Copy link
Member

iandees commented Feb 9, 2017

That's an error coming from the server. Does it happen consistently with this server? It could be that they've misconfigured the layer. Unfortunately, the Esri API doesn't give us many details about what caused the error.

@robsalasco
Copy link
Author

robsalasco commented Feb 9, 2017

Nope I only have problems with two layers (number 6 and 7) the others are downloaded without problems.

@iandees
Copy link
Member

iandees commented Feb 9, 2017

It looks like it happens consistently with this layer, though (since it also happened with the node scraper). It could be that there's an invalid geometry in the layer that's breaking the envelope query.

I don't think there's really anything we can do here.

@latot
Copy link

latot commented Sep 8, 2022

Hi!, this happens to me too D:

https://gis.mma.gob.cl/server/rest/services/SIMBIO/SIMBIO_AP/FeatureServer/0

Is weird, if we go to arcgis online (in the link) we can see the map and the features, so in case there is a invalid geometry that cause this I think a strategy would be...., download by chunks, if a chunk fails we can 1. retry, 2. split the chunk in sub-chunks and try them, then repeat downloading the data and use the same procedure, the idea is can isolate the invalid geometries (when in the subdivisions we end with a chunk of 1 feature).

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

No branches or pull requests

3 participants