Closed relima closed 3 years ago
Hmm, which version of QGIS do you use?
This may have something to do with the older file format, does this happen when you open an older QGIS project with EE layers saved using previous versions of the QGIS EE plugin?
The error happens when I try using the latest 3.16.3 with 0.0.3. However, everything works well once I am back to 0.0.2.
This is the complete error message:
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
The following message appears on my log, which may or may not be related to the problem
2021-01-31T20:38:23 WARNING Traceback (most recent call last): File "C:/Users/relim/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py", line 133, in updateLayers ee_object = ee.deserializer.fromJSON(ee_object) File "C:\Users\relim\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\deserializer.py", line 33, in fromJSON return decode(json.loads(json_obj)) File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\json__init__.py", line 341, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Does this happen in an empty project?
The problem DOES NOT happen in an empty project!
Thanks, @relima, this looks like a known bug. The problem is that the v0.0.3 QGIS file format is not backward-compatible, it uses newer EE libraries and the EE object JSON representation there is not backward-compatible with the older version. The easiest would be to re-run EE scripts for those layers to fix the problem in the older QGIS projects.
Thank you for your time and for looking into this @gena. I am going to recreate my project from scratch then and I believe it will solve that issue. Thanks!
Thanks for reporting! I will make sure the plugin at least shows a warning with a proper explanation instead of crashing.
This error started to show up just after I updated the code to 0.0.3.
Downgrading does fixes the issue. Any ideas?