Error: a float is required

117 views
Skip to first unread message

Roberta Fagandini

unread,
Jul 10, 2017, 9:24:12 AM7/10/17
to rsgislib...@googlegroups.com
Hi all,
I'm trying to follow the tutorial about Inverting for AOT using arcsi and Sentinel2 images but after converting to TOA the command returns an error:

Input Header: 'S2A_MSIL1C_20170124T101311_N0204_R022_T32TPR_20170124T101407.SAFE/MTD_MSIL1C.xml'
Output Basename: 'SEN2_20170124_lat46lon1098_T32TPR'
Error: a float is required
Error: The following products were not generated:
SREF DOSAOTSGL
Input Header: 'S2A_MSIL1C_20170124T101311_N0204_R022_T32TPR_20170124T101407.SAFE/MTD_MSIL1C.xml'
Output Basename: 'SEN2_20170124_lat46lon1098_T32TPR'

This is the command line:

arcsi.py --sensor sen2 -i S2A_MSIL1C_20170124T101311_N0204_R022_T32TPR_20170124T101407.SAFE/MTD_MSIL1C.xml -o S2A_MSIL1C_20170124T101311_N0204_R022_T32TPR_20170124T101407.SAFE/OutputsAOTInv --tmpath ./tmp -f KEA --stats -p RAD DOSAOTSGL SREF --aeroimg Documents/arcsi-1.4.2/data/WorldAerosolParams.kea --atmosimg Documents/arcsi-1.4.2/data/WorldAtmosphereParams.kea --dem S2A_MSIL1C_20170124T101311_N0204_R022_T32TPR_20170124T101407.SAFE/dem_10m_utm32 --minaot 0.05 --maxaot 0.6 --simpledos

My arcsi version is 1.4.2

I have already used this command with another Sentinel2 scene and everything worked fine. I searched the error within the arcsi code and it seems to be due to the metadata file.

Any suggestions? 

Thank you in advance!

Roberta

Roberta Fagandini

unread,
Jul 14, 2017, 8:18:03 AM7/14/17
to RSGISLib Support
Hi all,
finally we found the problem and it's now reported as bug (incl. attempt of bugfix) here:
https://bitbucket.org/petebunting/arcsi/issues/27/error-a-float-is-required-when

Roberta

Pete Bunting [pfb]

unread,
Jul 14, 2017, 9:58:41 AM7/14/17
to Roberta Fagandini, RSGISLib Support
Hi Roberta,

Many thanks for this, I’d seen the bitbucket post. I have updated the development channel with a fix for this issue. However, rather than setting an arbitrary value for the DEM no data value I have added an option --demnodata to the arcsi.py command to define a no data value and then if neither --demnodata or the image file provide an appropriate no data value an error message is given forcing the user to provide a no data value for the DEM either within the image header or via the terminal option.

I have just updating by development packages on the au-eoed conda channel - it will be version 2.2.7 of arcsi. Suggest you try this within a new environment as this version is under continuous development.

conda update -c au-eoed -c conda-forge arcsi

As for 1.4.2 I won’t provide a fix but suggest that people use the rsgiscalcimgstats.py (or similar) command to define a no data value within the image file header of the DEM image file.

Many thanks,

Pete

****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK
*
* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”
> --
> You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
> To post to this group, send email to rsgislib...@googlegroups.com.
> Visit this group at https://groups.google.com/group/rsgislib-support.
> For more options, visit https://groups.google.com/d/optout.



--------------------------------------------------------------------
Un o’r 4 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2016)
www.aber.ac.uk

Top 4 UK university and best in Wales for student satisfaction
(National Student Survey 2016)
www.aber.ac.uk

Roberta Fagandini

unread,
Aug 1, 2017, 9:08:21 AM8/1/17
to RSGISLib Support, robifa...@gmail.com, p...@aber.ac.uk
Hi Pete,
as you suggest me I have just installed the new arcsi version (2.2.9) within a new conda environment but I get an error running any command.
This i the error message:
 Traceback (most recent call last):
  File "/home/roberta/miniconda2/envs/arcsibugfix/bin/arcsi.py", line 54, in <module>
    import arcsilib.arcsirun
  File "/home/roberta/miniconda2/envs/arcsibugfix/lib/python3.5/site-packages/arcsilib/arcsirun.py", line 65, in <module>
    from arcsilib.arcsisensor import ARCSIAbstractSensor
  File "/home/roberta/miniconda2/envs/arcsibugfix/lib/python3.5/site-packages/arcsilib/arcsisensor.py", line 67, in <module>
    import rsgislib.imagecalc
  File "/home/roberta/miniconda2/envs/arcsibugfix/lib/python3.5/site-packages/rsgislib/imagecalc/__init__.py", line 6, in <module>
    from ._imagecalc import *
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

I read another post in which you say this is a memory error but everything works fine using a conda environment with the 1.4.2 version of arcsi.
Maybe there is something wrong in the installation..have you any suggestions?

Thank you in advance!

Roberta

Pete Bunting [pfb]

unread,
Aug 4, 2017, 2:46:39 AM8/4/17
to Roberta Fagandini, RSGISLib Support
Dear Roberta, 

Try updating your conda installation with the following command:

conda update -c au-eoed -c conda-forge --all

That fixed the issue for me. If it doesn’t create a new environment and do a new install. The issue is related to dependencies and sometimes conda doesn’t get it completely correct when it is quite a long chain of dependencies so something is fully updated when a package is installed.

Best wishes, 

Pete


****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK

* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”

Markus Neteler

unread,
Aug 8, 2017, 10:39:59 AM8/8/17
to Pete Bunting [pfb], Roberta Fagandini, RSGISLib Support
Hi Pete,

On Fri, Jul 14, 2017 at 3:58 PM, Pete Bunting [pfb] <p...@aber.ac.uk> wrote:
> Hi Roberta,
>
> Many thanks for this, I’d seen the bitbucket post. I have updated the development channel with a fix for this issue. However, rather than setting an arbitrary value for the DEM no data value I have added an option --demnodata to the arcsi.py command to define a no data value and then if neither --demnodata or the image file provide an appropriate no data value an error message is given forcing the user to provide a no data value for the DEM either within the image header or via the terminal option.
>
> I have just updating by development packages on the au-eoed conda channel - it will be version 2.2.7 of arcsi. Suggest you try this within a new environment as this version is under continuous development.
>
> conda update -c au-eoed -c conda-forge arcsi

I have setup a fresh install on one of our servers in order to fetch
the dev version:
- using miniconda3 for Python 3.6
- using the command line indicated above.

Still only the official 1.4.2 shows up:

(arcsi_env) [rfagandini@sat-analyse2 ~]$ conda update -c au-eoed -c
conda-forge arcsi
Fetching package metadata .............
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/rfagandini/miniconda3/envs/arcsi_env:
#
arcsi 1.4.2 py36_0 conda-forge

Which trick is needed to fetch the dev version?

thanks,
Markus



--
Markus Neteler, PhD
http://www.mundialis.de - free data with free software
http://grass.osgeo.org
http://courses.neteler.org/blog

Daniel Clewley

unread,
Aug 9, 2017, 8:07:00 AM8/9/17
to Markus Neteler, Pete Bunting [pfb], Roberta Fagandini, RSGISLib Support
Hi Markus,

Pete's dev builds are only for Python 3.5 so you will need to create a new environment using Python 3.5 (pass in python=3.5 as one of the packages).

Thanks,

Dan
> --
> You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
> To post to this group, send an email to rsgislib...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages