Why can't I write the tensorflow predicted images from google earth engine to google cloud bucket vía google colab? - tensorflow

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.

Related

How to fix - AttributeError: partially initialized module 'mailslurp_client'

I'm trying to run script but keep getting this error:
Traceback (most recent call last):
File "C:\Users\vpetra\Desktop\test_webdriver\DXt_project\mailslurp_client.py", line 1, in
import mailslurp_client
File "C:\Users\vpetra\Desktop\test_webdriver\DXt_project\mailslurp_client.py", line 3, in
configuration = mailslurp_client.Configuration()
AttributeError: partially initialized module 'mailslurp_client' has no attribute 'Configuration' (most likely due to a circular import)

I am getting this error while importing keras to shell, while I have installed tensorflow of version 2.4.1 and keras 2.4.3

C:\WINDOWS\system32>python
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import tensorflow
Traceback (most recent call last):
File "C:\Users\vbhav\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\vbhav\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\vbhav\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python_init.py", line 39, in
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
File "C:\Users\vbhav\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\vbhav\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
I installed Microsoft C++ redistributable application. And this error was fixed.
https://aka.ms/vs/16/release/vc_redist.x64.exe

AttributeError: module 'tensorflow.contrib' has no attribute 'checkpoint'

I am implementing the below link and getting a TensorFlow version error. I am working in Pycharm under Conda environment.
https://github.com/ZhaoJ9014/High-Performance-Face-Recognition/tree/master/src/Look%20Across%20Elapse-%20Disentangled%20Representation%20Learning%20and%20Photorealistic%20Cross-Age%20Face%20Synthesis%20for%20Age-Invariant%20Face%20Recognition.TensorFlow
I tried many versions, in some versions, the problem has been solved but the GPU available is False. The problem is in the version I didn't find any compatible version in which the GPU available is True.
pip install tensorflow-gpu==1.6.0, 1.5.0, 1.8.0
Traceback
Traceback (most recent call last):
File "/home/khawar/Desktop/AAAIFace/train_main.py", line 4, in <module>
import modeleag as M
File "/home/khawar/Desktop/AAAIFace/modeleag.py", line 1, in <module>
import layers2 as L
File "/home/khawar/Desktop/AAAIFace/layers2.py", line 36, in <module>
class Layer(tf.contrib.checkpoint.Checkpointable):
File "/home/khawar/anaconda3/envs/AAAIFace/lib/python3.6/site-packages/tensorflow/python/util/lazy_loader.py", line 54, in __getattr__
return getattr(module, item)
AttributeError: module 'tensorflow.contrib' has no attribute 'checkpoint'

ImportError with tensorflow

ImportError: Traceback (most recent call last):
File "C:\Users\Parth Manghnani\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
Failed to load the native TensorFlow runtime.

ImportError: cannot import name 'get_keras_submodule' from partially initialized module 'keras_applications' (most likely due to a circular import)

I use python 3.8.6 and I have loaded Keras 2.2.2, TensorFlow-GPU 2.2.0.
When I run my code, I have this error:
Using TensorFlow backend.
Traceback (most recent call last):
File "XX.py", line 23, in <module>
import keras
File ".local/lib/python3.8/site-packages/keras/__init__.py", line 5, in <module>
from . import applications
File ".local/lib/python3.8/site-packages/keras/applications/__init__.py", line 11, in <module>
import keras_applications
File ".local/lib/python3.8/site-packages/keras_applications/__init__.py", line 8, in <module>
from keras_applications import vgg16
File ".local/lib/python3.8/site-packages/keras_applications/vgg16.py", line 15, in <module>
from . import get_keras_submodule
ImportError: cannot import name 'get_keras_submodule' from partially initialized module 'keras_applications' (most likely due to a circular import) (/local/lib/python3.8/site-packages/keras_applications/__init__.py)
How to solve this error other than downgrade the TensorFlow version?
Thanks!