Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用标准代码从Python API访问和下载Sentinel-2图像 rec=多边形((597843.23 2977645.792070312,686175.1025585937 2977645.792070312,686175.1025585937 3112308.537736816,597843.23 312308.537736816,597843.23 2977645.792070312)) products=api.query(rec, 日期=('20191001'、'20191031'), platformname='Sentinel-2', 云覆盖率=(0,40) )_Python_Api_Sentinel_Sentinel2_Sentinelsat - Fatal编程技术网

无法使用标准代码从Python API访问和下载Sentinel-2图像 rec=多边形((597843.23 2977645.792070312,686175.1025585937 2977645.792070312,686175.1025585937 3112308.537736816,597843.23 312308.537736816,597843.23 2977645.792070312)) products=api.query(rec, 日期=('20191001'、'20191031'), platformname='Sentinel-2', 云覆盖率=(0,40) )

无法使用标准代码从Python API访问和下载Sentinel-2图像 rec=多边形((597843.23 2977645.792070312,686175.1025585937 2977645.792070312,686175.1025585937 3112308.537736816,597843.23 312308.537736816,597843.23 2977645.792070312)) products=api.query(rec, 日期=('20191001'、'20191031'), platformname='Sentinel-2', 云覆盖率=(0,40) ),python,api,sentinel,sentinel2,sentinelsat,Python,Api,Sentinel,Sentinel2,Sentinelsat,对于下载sentinel-2图像的上述代码,我得到以下错误: KeyError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/sentinelsat/sentinel.py in _load_subquery(self, query, order_by, limit, offset) 394 jso

对于下载sentinel-2图像的上述代码,我得到以下错误:

KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/sentinelsat/sentinel.py in _load_subquery(self, query, order_by, limit, offset)

    394             json_feed = response.json()["feed"]
--> 395             if json_feed["opensearch:totalResults"] is None:
    396                
# We are using some unintended behavior of the server that a null is

KeyError: 'opensearch:totalResults'

During handling of the above exception, another exception occurred:

SentinelAPIError                          Traceback (most recent call last)
3 frames
/usr/local/lib/python3.6/dist-packages/sentinelsat/sentinel.py in _load_subquery(self, query, order_by, limit, offset)

    401             total_results = int(json_feed["opensearch:totalResults"])
    402         except (ValueError, KeyError):
403          raise SentinelAPIError("API response not valid. JSON decoding failed.", response)
    404 
    405         products = json_feed.get("entry", [])

SentinelAPIError: HTTP status 200 OK: API response not valid. JSON decoding failed.

我已经阅读了文档并参考了关于同一错误的类似问题,但无法解决问题。

您的多边形值不是坐标

大宗报价

rec=多边形(597843.23 2977645.7920703125.1025585937 2977645.7920703125.686175.1025585937 3112308.537736816、597843.23 3112308.537736816、597843.23 2977645.792070312))


您需要用经纬度值描述多边形。

Thankyou@Ioannis。我把投影系统改成了WGS84,现在数据可以下载了。