2014-03-11 12:56 GMT+01:00 Geo DrinX <[email protected]>:

> Hello All,
>
>
> as in object,  I had an error from python, with my source code, that I do
> not understand
>
>
>     CamNick = 90 - int(pitch)
> ValueError: invalid literal for int() with base 10: '36.30'
>
>
> Somebody can help me to understand why   "36.30"  is not  good to reurn an
> int value ?
>
> For me, is a mistery.  :(
>


You can't convert a string that represents a float to an integer, you
should first convert to float then to int:

int(float('36.30'))

BTW this kind of questions should not be asked here but on one of the
several python mailing lists.


-- 
Alessandro Pasotti
w3:   www.itopen.it
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to