Human Movement

2629
6
Jump to solution
02-04-2016 06:27 AM
BaffourAwuah
New Contributor III

Can someone help me out? I'm trying to use Distributive Flow Lines Tool for Human Movement  Analysis, but unfortunately I keep on getting this Error Message: Traceback(most recent call last); File “<string>”, line 136, in updateParameters ValueError: invalid literal for float(): 1009529,06119841. Can someone help me out?  Does ArcGis provide any other tool for that purpose?

0 Kudos
1 Solution

Accepted Solutions
DarrenWiens2
MVP Honored Contributor

The problem is to do with using a comma separator.

>>> myString = '10000,02837'
>>> float(myString) # it doesn't work
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: invalid literal for float(): 10000,02837
>>> myString = '10000.02837'
>>> float(myString)
10000.02837 # it works!

Try changing all the commas in that field to periods.

View solution in original post

6 Replies
DanPatterson_Retired
MVP Emeritus

Since that is not a part of the esri suite of extensions...perhaps you could elaborate as to where this might be obtained... but based on 1009529,06119841  ​could you post the code if you have it...if it is in python

0 Kudos
DarrenWiens2
MVP Honored Contributor

The problem is to do with using a comma separator.

>>> myString = '10000,02837'
>>> float(myString) # it doesn't work
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: invalid literal for float(): 10000,02837
>>> myString = '10000.02837'
>>> float(myString)
10000.02837 # it works!

Try changing all the commas in that field to periods.

DanPatterson_Retired
MVP Emeritus

Darren may be on to something... try to see your regional settings and look for the 'decimal_point' separator option.  In this example, you will see that a period is used in Canada

>>> import locale
>>> loc = locale.getlocale()
>>> loc
(None, None)
>>> locale.localeconv()
{'mon_thousands_sep': '', 'mon_grouping': [], 'decimal_point': '.', 'p_sep_by_space': 127, 'int_curr_symbol': '', 'n_cs_precedes': 127, 'positive_sign': '', 'p_sign_posn': 127, 'n_sep_by_space': 127, 'p_cs_precedes': 127, 'thousands_sep': '', 'negative_sign': '', 'frac_digits': 127, 'n_sign_posn': 127, 'currency_symbol': '', 'mon_decimal_point': '', 'int_frac_digits': 127, 'grouping': []}

>>>

BaffourAwuah
New Contributor III

Dan and Darren, thanks for your suggestions. I need to talk to our administrator before changing the local settings, right?  I downloaded this program from: Distributive Flow Maps – More Raster, More Faster | Applications Prototype Lab.

BaffourAwuah
New Contributor III

That is absolutely Perfect. It worked like Magic. Thanks, once again, Dan and Darren!

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Baffour Awuah I unmarked your own post as the correct answer. Could you mark the thread that answered your question as the correct one?

0 Kudos