You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2024. It is now read-only.
I believe I have set up everything correctly, but the following code:
importeeee.Initialize()
importresteeasree# get an authenticated session with GCP for REST API callssession=ree.EESession("<secret>","<super secret>")
# use ee to get a featurecollection for USAcountries=ee.FeatureCollection("USDOS/LSIB_SIMPLE/2017")
camerica=countries.filter(ee.Filter.eq("wld_rgn", "Central America"))
# define the domain imagery will be requested for# in this case it is the computed USA featurecollectiondomain=ree.Domain.from_ee_geometry(session,camerica,resolution=0.01)
gives the following error: DriverError: '/vsimem/5c2fb0daef8141bc9dc81453856ced7c' not recognized as a supported file format.
full traceback:
Details
---------------------------------------------------------------------------CPLE_OpenFailedErrorTraceback (mostrecentcalllast)
fiona/_shim.pyxinfiona._shim.gdal_open_vector()
fiona/_err.pyxinfiona._err.exc_wrap_pointer()
CPLE_OpenFailedError: '/vsimem/5c2fb0daef8141bc9dc81453856ced7c'notrecognizedasasupportedfileformat.
Duringhandlingoftheaboveexception, anotherexceptionoccurred:
DriverErrorTraceback (mostrecentcalllast)
/tmp/ipykernel_3018/3436715166.pyin<module>13# define the domain imagery will be requested for14# in this case it is the computed USA featurecollection--->15domain=ree.Domain.from_ee_geometry(session,camerica,resolution=0.01)
1617# define some computations~/miniconda3/envs/xaquacrop-dev/lib/python3.9/site-packages/restee/core.pyinfrom_ee_geometry(session, geom, resolution)
231response=session.send_request(url, payload)
232-->233gdf=gpd.read_file(StringIO(response.content.decode()))
234235returnDomain.from_geopandas(gdf, resolution=resolution)
~/miniconda3/envs/xaquacrop-dev/lib/python3.9/site-packages/geopandas/io/file.pyin_read_file(filename, bbox, mask, rows, **kwargs)
199200withfiona_env():
-->201withreader(path_or_bytes, **kwargs) asfeatures:
202203# In a future Fiona release the crs attribute of features will~/miniconda3/envs/xaquacrop-dev/lib/python3.9/site-packages/fiona/collection.pyin__init__(self, bytesbuf, **kwds)
553554# Instantiate the parent class.-->555super(BytesCollection, self).__init__(self.virtual_file, vsi=filetype,
556encoding='utf-8', **kwds)
557~/miniconda3/envs/xaquacrop-dev/lib/python3.9/site-packages/fiona/collection.pyin__init__(self, path, mode, driver, schema, crs, encoding, layer, vsi, archive, enabled_drivers, crs_wkt, ignore_fields, ignore_geometry, **kwargs)
160ifself.mode=='r':
161self.session=Session()
-->162self.session.start(self, **kwargs)
163elifself.modein ('a', 'w'):
164self.session=WritingSession()
fiona/ogrext.pyxinfiona.ogrext.Session.start()
fiona/_shim.pyxinfiona._shim.gdal_open_vector()
DriverError: '/vsimem/5c2fb0daef8141bc9dc81453856ced7c'notrecognizedasasupportedfileformat.
where it is linked to this SO thread and it seems that for some reason response.content.decode results in a HTML page?
I believe I have set up everything correctly, but the following code:
gives the following error:
DriverError: '/vsimem/5c2fb0daef8141bc9dc81453856ced7c' not recognized as a supported file format.full traceback:
Details
where it is linked to this SO thread and it seems that for some reason
response.content.decoderesults in a HTML page?