[英]Python API sentinelsat error in download
I am having a go at using the sentinelsat python API to download satellite imagery. 我正在尝试使用sentinelsat python API下载卫星图像。 However, I am receiving error messages when I try to convert to a pandas dataframe.
但是,当我尝试转换为熊猫数据框时,收到错误消息。 This code works and downloads my requested sentinel satellite images:
此代码有效并下载了我请求的哨兵卫星图像:
from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
from datetime import date
api = SentinelAPI('*****', '*****', 'https://scihub.copernicus.eu/dhus')
footprint = geojson_to_wkt(read_geojson('testAPIpoly.geojson'))
products = api.query(footprint, cloudcoverpercentage = (0,10))
#this works
api.download_all(products)
However if I instead attempt to convert to a pandas dataframe 但是,如果我改为尝试转换为熊猫数据框
#api.download_all(products)
#this does not work
products_df = api.to_dataframe(products)
api.download_all(products_df)
I receive an extensive error message that includes 我收到大量错误消息,其中包括
"sentinelsat.sentinel.SentinelAPIError: HTTP status 500 Internal Server Error: InvalidKeyException : Invalid key (processed) to access Products "
“ sentinelsat.sentinel.SentinelAPIError:HTTP状态500内部服务器错误:InvalidKeyException:访问产品的无效密钥(已处理)”
(where processed is also replaced with title , platformname , processingbaseline , etc.). (已处理的地方也替换为title , platformname , processingbaseline等)。 I've tried a few different ways to convert to a dataframe and filter/sort results and have received an error message every time (note: I have pandas/geopandas installed).
我尝试了几种不同的方法来转换为数据框并进行过滤/排序结果,并且每次都收到错误消息(请注意:我安装了熊猫/ geopandas)。 How can I convert to a dataframe and filter/sort with the sentinelsat API?
如何使用sentinelsat API转换为数据框并进行过滤/排序?
Instead of 代替
api.download_all(products_df)
try 尝试
api.download_all(products_df.index)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.