ubarsc / python-fmask

A set of command line utilities and Python modules that implement the ‘fmask’ algorithm
https://www.pythonfmask.org
GNU General Public License v3.0
75 stars 20 forks source link

Unable to move the cache, Access denied 0x5 #73

Closed FrancescoSorrentino closed 6 months ago

FrancescoSorrentino commented 7 months ago

Hello, i've downloaded python-fmask-0.5.8 and used "pip install ." as is written in "INASTALL.txt". When i use the command "fmask_sentinel2Stacked.py -o cloud.img --safedir S2B_MSIL1C_20230505T100029_N0509_R122_T33SUC_20230505T120156.SAFE" i get this error:

[6584:0308/104510.522:ERROR:cache_util_win.cc(20)] Unable to move the cache: Accesso negato. (0x5) [6584:0308/104510.522:ERROR:disk_cache.cc(205)] Unable to create cache

gillins commented 7 months ago

Which operating system are you using? Windows?

gillins commented 7 months ago

And, what happens if you install via Conda Forge (see https://www.pythonfmask.org/en/latest/#downloads)? Does it work then? There is a known issue with "pip install" and entrypoints on Windows with this package that we must fix...

FrancescoSorrentino commented 7 months ago

I'm trying to use the conda-forge version, now the cloud masking routine starts, but in the doCloudLayerFinalPass function of fmask.py, when the imagewriter of rios is called, and so the Driver_Create of gdal is called, i get this error:

TypeError: invalid value for GDALDataType

The command is the same as i wrote in the original comment of this issue, the .SAFE dir was downloaded from ESA Copernicus Hub.

gillins commented 7 months ago

@FrancescoSorrentino there is indeed a problem with fmask and recent GDAL we had not noticed. Can you make the change to fmask.py in your conda install to follow the one in https://github.com/ubarsc/python-fmask/pull/74 ?

FrancescoSorrentino commented 7 months ago

I updated the code with that snipped and it worked to me! Thank you for the support!

gillins commented 6 months ago

Thanks for persevering! We'll get a new release out with this and other fixes soon.