1

I've taken the example from https://colab.research.google.com/github/google/earthengine-api/blob/master/python/examples/ipynb/UNET_regression_demo.ipynb but at the "doPrediction(image_base, user_folder, kernel_buffer, region)" part, it throw's me this error when ends writeng the patches:

...WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term Running command using Cloud API. Set --no-use_cloud_api to go back to using the API

W0628 01:00:34.470155 139679737870208 init.py:48] file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in from oauth2client.contrib.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in from oauth2client.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/init.py", line 44, in autodetect from . import file_cache File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in "file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth" ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth W0628 01:00:35.849350 139679737870208 init.py:48] file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in from oauth2client.contrib.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in from oauth2client.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/init.py", line 44, in autodetect from . import file_cache File "/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in "file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth" ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth Name "projects/earthengine-public/assets/FCNN-ELQUI-pisco_" is invalid. The portion of the Asset name following "projects/*/assets/" must have at least 3 segments and at most 10 segments.

maybe it's something about the folder where I intend to write the patches, that is googlecloud bucket.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
  • It's pretty unclear for me the issue that you are facing. Did you tried to just write a file to storage from colab? Did you provided the right permisions to your colab service account? – Chris32 Jun 29 '20 at 15:09
  • Thanks, @Chris32. I create all the permisions I think are needed as indicated in colab example: -from google.colab import auth auth.authenticate_user() -ee.Authenticate() and ee.Initialize() -even !earthengine authenticate. Also I think the problem is issolated to this line of code: `!earthengine upload image --asset_id={out_image_asset} {out_image_file} {jsonFile}` where it cannot upload the image from google cloud drive bucket to the earth engine as a new asset, just by doing it manually in the GEE platform. – R. Márquez Jun 30 '20 at 00:12

0 Answers0