grass-addons icon indicating copy to clipboard operation
grass-addons copied to clipboard

[Bug] error in i.modis.import

Open DIARSproject opened this issue 3 years ago • 1 comments

I am using the i.modis extension. I have Fedora 33 python 3.9 grass gis 7.8.5

When I am going to import the modis files I get an error which is solved is I add the flag -m to the i.modis.import command

GRASS 7.8.5 (hyperWGS84):~ > i.modis.download settings=$HOME/settingsNASA.txt product=lst_terra_eight_1000 tile=h10v08 startday=2009-01-01 endday=2019-12-31 folder=. Downloading MODIS product <lst_terra_eight_1000>... All data have been downloaded, continue with i.modis.import with the option 'files=./listfileMOD11A2.006.txt' [Raster MASK present] GRASS 7.8.5 (hyperWGS84):~ > i.modis.import files=./listfileMOD11A2.006.txt spectral="( 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 )" WARNING: If no QA layer chosen in the "spectral" option the command will report an error Proccessing <MOD11A2.A2019361.h10v08.006.2020005030944.hdf> (1/506)... Traceback (most recent call last): File "/home/garzonc/.grass7/addons/scripts/i.modis.import", line 675, in sys.exit(main()) File "/home/garzonc/.grass7/addons/scripts/i.modis.import", line 627, in main single(options, remove, analyze, over, outfile) File "/home/garzonc/.grass7/addons/scripts/i.modis.import", line 432, in single import_tif(basedir=basedir, rem=remove, write=ow, pm=pm, File "/home/garzonc/.grass7/addons/scripts/i.modis.import", line 321, in import_tif data = metadata(pm, mapname) File "/home/garzonc/.grass7/addons/scripts/i.modis.import", line 249, in metadata rangetime = pars.retRangeTime() File "/home/garzonc/.local/lib/python3.9/site-packages/pymodis/parsemodis.py", line 171, in retRangeTime for i in self.granule.find('RangeDateTime').getiterator(): AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator' [Raster MASK present] GRASS 7.8.5 (hyperWGS84):~ > i.modis.import -m files=./listfileMOD11A2.006.txt spectral="( 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 )" WARNING: If no QA layer chosen in the "spectral" option the command will report an error Processing <A2019361> (1/506)...

And the command runs and the data is imported.

Thanks!

Carol.

DIARSproject avatar Mar 26 '21 19:03 DIARSproject

I do not understand why would -m solve the error if it is intended to make mosaics and you are importing only one tile... @lucadelu any idea?

veroandreo avatar Mar 29 '21 15:03 veroandreo