Classify land cover to measure shrinking lakes | ArcGIS API for Python | Esri Developer
The code extracting the sentinel fata in this tutorial is not working for me.
sentinel2016 = gis.content.get("a264d1eaa8bd4ff2a0a1e27b59daa7d3")
sentinel2017 = gis.content.get("ea192d03d1324c62a2cb91e26e3a0ece")
These Item IDs do not seem to be publicly accessible. Each of these have the following error traceback:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
Cell In[15], line 1
----> 1 sentinel2016 = gis.content.get("a264d1eaa8bd4ff2a0a1e27b59daa7d3")
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\__init__.py:7747, in ContentManager.get(self, itemid)
7745 return None
7746 else:
-> 7747 raise e
7749 if item is not None:
7750 return Item(self._gis, itemid, item)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\__init__.py:7737, in ContentManager.get(self, itemid)
7724 """
7725 The ``get`` method returns the :class:`~arcgis.gis.Item` object for the specified itemid.
7726
(...)
7734 The item object if the item is found, None if the item is not found.
7735 """
7736 try:
-> 7737 item = self._portal.get_item(itemid)
7738 except RuntimeError as re:
7739 if re.args[0].__contains__("Item does not exist or is inaccessible"):
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_portalpy.py:1430, in Portal.get_item(self, itemid)
1366 def get_item(self, itemid: str):
1367 """Returns the item information for the specified item.
1368
1369 Arguments
(...)
1428 ================ ========================================================
1429 """
-> 1430 return self.con.post("content/items/" + itemid, self._postdata())
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py:1529, in Connection.post(self, path, params, files, **kwargs)
1527 if return_raw_response:
1528 return resp
-> 1529 return self._handle_response(
1530 resp=resp,
1531 out_path=out_path,
1532 file_name=file_name,
1533 try_json=try_json,
1534 force_bytes=kwargs.pop("force_bytes", False),
1535 )
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py:1004, in Connection._handle_response(self, resp, file_name, out_path, try_json, force_bytes, ignore_error_key)
1002 return data
1003 errorcode = data["error"]["code"] if "code" in data["error"] else 0
-> 1004 self._handle_json_error(data["error"], errorcode)
1005 return data
1006 else:
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py:1027, in Connection._handle_json_error(self, error, errorcode)
1024 # _log.error(errordetail)
1026 errormessage = errormessage + "\n(Error Code: " + str(errorcode) + ")"
-> 1027 raise Exception(errormessage)
Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403)And the link to the Copernicus Open Access Hub via scihub.copernicus.eu also seems to be broken, so I do not know what data specifically needs to be downloaded for this training.
What could be the cause here? Many thanks!