AlertaDengue / AlertaDengueCaptura

Rotinas para captura de dados
GNU General Public License v3.0
6 stars 11 forks source link

Bugfix earthengine-api #79

Open esloch opened 3 years ago

esloch commented 3 years ago

The 2.0.0 release no longer retrieves discovery documents dynamically on each call to discovery.build(). Instead, discovery documents are retrieved from the client library itself.

See: https://github.com/googleapis/google-api-python-client/blob/master/UPGRADING.md https://github.com/google/earthengine-api/issues/157

==================================== ERRORS ====================================
________ ERROR collecting downloader_app/tests/test_tiff_downloader.py _________
downloader_app/tests/test_tiff_downloader.py:9: in <module>
    from downloader_app import tiff_downloader as td
downloader_app/tiff_downloader.py:36: in <module>
    ee.Initialize()
/opt/conda/lib/python3.7/site-packages/ee/__init__.py:123: in Initialize
    http_transport=http_transport)
/opt/conda/lib/python3.7/site-packages/ee/data.py:199: in initialize
    _install_cloud_api_resource()
/opt/conda/lib/python3.7/site-packages/ee/data.py:273: in _install_cloud_api_resource
    http_transport=_http_transport)
/opt/conda/lib/python3.7/site-packages/ee/_cloud_api_utils.py:151: in build_cloud_resource
    cache_discovery=False)
/opt/conda/lib/python3.7/site-packages/googleapiclient/_helpers.py:134: in positional_wrapper
    return wrapped(*args, **kwargs)
/opt/conda/lib/python3.7/site-packages/googleapiclient/discovery.py:282: in build
    static_discovery=static_discovery,
/opt/conda/lib/python3.7/site-packages/googleapiclient/discovery.py:387: in _retrieve_discovery_doc
    raise UnknownApiNameOrVersion("name: %s  version: %s" % (serviceName, version))
E   googleapiclient.errors.UnknownApiNameOrVersion: name: earthengine  version: v1alpha
=============================== warnings summary ===============================
/opt/conda/lib/python3.7/site-packages/rasterstats/io.py:24
/opt/conda/lib/python3.7/site-packages/rasterstats/io.py:24
  /opt/conda/lib/python3.7/site-packages/rasterstats/io.py:24: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from collections import Iterable, Mapping

/opt/conda/lib/python3.7/site-packages/holoviews/operation/datashader.py:5
  /opt/conda/lib/python3.7/site-packages/holoviews/operation/datashader.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from collections import Callable

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR downloader_app/tests/test_tiff_downloader.py - googleapiclient.errors.U...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 3 warnings, 1 error in 8.92s =========================
make: *** [docker/satellite/Makefile:53: test_downloader_app] Error 2
Error: Process completed with exit code 2.
esloch commented 3 years ago

Pinned all dependencies versions of earthengine:

google-api-core           1.25.1   >>   google-api-core==1.24.0
google-api-python-client  1.12.8   >>   google-api-python-client==1.12.4
google-auth               1.27.1   >>   google-auth==1.22.1
google-auth-httplib2      0.0.4    >>   google-auth-httplib2==0.0.4
google-cloud-core         1.6.0    >>   google-cloud-core==1.4.3
google-cloud-storage      1.36.1   >>   google-cloud-storage==1.32.0
google-crc32c             1.1.2    >>   google-crc32c==1.0.0
google-resumable-media    1.2.0    >>   google-resumable-media==1.1.0
googleapis-common-protos  1.52.0   >>   googleapis-common-protos==1.52.0
earthengine-api           0.1.244  >>   earthengine-api==0.1.239

Current traceback:

downloader_worker_1    |   uid=uid, euid=euid, gid=gid, egid=egid,
downloader_worker_1    | [2021-03-11 17:18:00,272: INFO/ForkPoolWorker-2] downloader_app.tasks.download_source[655bff9f-9641-4efd-ac9c-e56812f7d027]: Fetch LandDAAC-v5-day ['2016-07-20', '2016-07-28', '2016-08-05']
downloader_worker_1    | [2021-03-11 17:18:00,274: INFO/ForkPoolWorker-2] Downloading LandDAAC-v5-day,2016-07-20
downloader_worker_1    | [2021-03-11 17:18:00,292: INFO/ForkPoolWorker-2] Skipping download. Skipping request.
downloader_worker_1    | [2021-03-11 17:18:00,292: INFO/ForkPoolWorker-2] Downloading LandDAAC-v5-day,2016-07-28
downloader_worker_1    | [2021-03-11 17:18:00,298: INFO/ForkPoolWorker-2] Skipping download. Skipping request.
downloader_worker_1    | [2021-03-11 17:18:00,298: INFO/ForkPoolWorker-2] Downloading LandDAAC-v5-day,2016-08-05
downloader_worker_1    | [2021-03-11 17:18:00,303: INFO/ForkPoolWorker-2] Skipping download. Skipping request.
downloader_worker_1    | [2021-03-11 17:18:00,340: WARNING/ForkPoolWorker-2] /opt/conda/lib/python3.7/site-packages/xarray/core/alignment.py:304: FutureWarning: Index.__or__ operating as a set operation is deprecated, in the future this will be a logical operation matching Series.__or__.  Use index.union(other) instead
downloader_worker_1    |   index = joiner(matching_indexes)
downloader_worker_1    | 
downloader_worker_1    | [2021-03-11 17:18:00,386: ERROR/ForkPoolWorker-2] downloader_app.tasks.download_source[655bff9f-9641-4efd-ac9c-e56812f7d027]: [EE] fetching from LandDAAC-v5-day at ['2016-07-20', '2016-07-28', '2016-08-05'] error: conflicting sizes for dimension 'time': length 3 on 'time' and length 6 on <this-array>
downloader_worker_1    | [2021-03-11 17:18:00,388: INFO/ForkPoolWorker-2] Task downloader_app.tasks.download_source[655bff9f-9641-4efd-ac9c-e56812f7d027] succeeded in 0.11513357