gee-community / geetools

A collection of tools to work with Google Earth Engine Python API
https://geetools.readthedocs.io/en/stable/
MIT License
503 stars 121 forks source link

AttributeError: module 'geetools' has no attribute 'batch' #256

Open jitesh-seth opened 3 months ago

jitesh-seth commented 3 months ago

I want to export an ImageCollection using geetools.batch.Export.imagecollection.toDrive() but I am getting the error as mentioned in the title: AttributeError: module 'geetools' has no attribute 'batch' I have tried with v1.1.0 and v1.3.0 and am getting the same result. This is the output of dir(geetools) in v1.1.0:

['Authenticate',
 'AuthenticateAccessor',
 'ComputedObject',
 'Date',
 'DateAccessor',
 'Dictionary',
 'DictionaryAccessor',
 'Feature',
 'FeatureAccessor',
 'FeatureCollection',
 'FeatureCollectionAccessor',
 'Filter',
 'FilterAccessor',
 'Geometry',
 'GeometryAccessor',
 'Image',
 'ImageAccessor',
 'ImageCollection',
 'ImageCollectionAccessor',
 'Initialize',
 'InitializeAccessor',
 'Join',
 'JoinAccessor',
 'List',
 'ListAccessor',
 'Number',
 'NumberAccessor',
 'String',
 'StringAccessor',
 '__author__',
 '__builtins__',
 '__cached__',
 '__copyright__',
 '__doc__',
 '__email__',
 '__file__',
 '__license__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 '__summary__',
 '__title__',
 '__uri__',
 '__version__',
 '_deprecated_decision_tree',
 '_deprecated_expressions',
 '_deprecated_filters',
 '_deprecated_indices',
 '_deprecated_manager',
 '_deprecated_oauth',
 '_deprecated_utils',
 '_deprecated_visualization',
 'accessors',
 'array',
 'collection',
 'date',
 'decision_tree',
 'dictionary',
 'ee',
 'element',
 'expressions',
 'feature',
 'featurecollection',
 'filters',
 'geometry',
 'imagecollection',
 'indices',
 'manager',
 'number',
 'oauth',
 'string',
 'tools',
 'types',
 'utils',
 'visualization']

I installed geetools using pip. Kindly help.

12rambau commented 3 months ago

I think it's typically the use case presented in the documentation: https://geetools.readthedocs.io/en/stable/usage/migration.html

But even if you manage to sucessfully import it my guess is that it's not going to work as the batch module is not yet refactored (as per #241).

I don't know what you are doing with your imageCollection afterward but in case you analyse it with Xarray, be aware that v1 has a to_xarray method based on Xee package: https://geetools.readthedocs.io/en/stable/autoapi/geetools/ImageCollection/index.html#geetools.ImageCollection.ImageCollectionAccessor.to_xarray