diff --git a/README.md b/README.md index 5c96188..73b28af 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ A: Go to http://code.earthengine.google.com and make sure you can access code ed - [x] Fixed the authentication dialog when the url shortener doesn't work by any reason [#66](https://github.com/gee-community/qgis-earthengine-plugin/issues/66) - [x] Fix loading extra python dependencies to the plugin, fix [#62](https://github.com/gee-community/qgis-earthengine-plugin/issues/62) +#### Alpha 0.0.4 (Q1 2021) :heavy_check_mark: +- [x] Minor bugfix release (EE authentication) + #### 1.0.0 (Q2 2021) :hourglass: - [ ] EE vector layer inspector - [ ] EE raster collection layer inspector diff --git a/ee_plugin.py b/ee_plugin.py index 891d8ef..36751ea 100644 --- a/ee_plugin.py +++ b/ee_plugin.py @@ -130,8 +130,16 @@ def updateLayers(self): ee_object = l.customProperty('ee-object') ee_object_vis = l.customProperty('ee-object-vis') + # check for backward-compatibility, older file formats (before 0.0.3) store ee-objects in ee-script property an no ee-object-vis is stored + # also, it seems that JSON representation of persistent object has been changed, making it difficult to read older EE JSON + if ee_object is None: + print('\nWARNING:\n Map layer saved with older version of EE plugin is detected, backward-compatibility for versions before 0.0.3 is not supported due to changes in EE library, please re-create EE layer by re-running the Python script\n') + return + ee_object = ee.deserializer.fromJSON(ee_object) - ee_object_vis = json.loads(ee_object_vis) + + if ee_object_vis is not None: + ee_object_vis = json.loads(ee_object_vis) # update loaded EE layer diff --git a/metadata.txt b/metadata.txt index cd9106e..0b0979f 100644 --- a/metadata.txt +++ b/metadata.txt @@ -10,7 +10,7 @@ name=Google Earth Engine qgisMinimumVersion=3.8 description=Integrates QGIS with Google Earth Engine -version=0.0.3 +version=0.0.4 author=Gennadii Donchyts email=gennadiy.donchyts@gmail.com