ERROR

ValueError: could not convert string to float: '<string>'

Last Published: July 5, 2022

Error Message

When running the Train Deep Learning Model tool in ArcGIS Pro, the following error message is returned:

Error:
ValueError: could not convert string to float: '<string>'
The Train Deep Learning Model (Image Analyst Tools) error message window.

Cause

The error message is returned when the numeric values used in the ArcGIS Pro Train Deep Learning Model tool include a comma instead of a decimal point as the decimal delimiter.

ArcGIS Pro Deep Learning tools, including the Export Training Data For Deep Learning tool, use the Windows regional settings to export or train data. Python scripts only expect a decimal point to be the decimal delimiter, and assume numeric values with a comma to be strings. Therefore, regional or language settings that use a comma in the numeric values cause the tool to fail and return the error message.

Solution or Workaround

  1. Change the number formats in the Windows regional settings. Refer to Microsoft Support: Change the Windows regional settings to modify the appearance of some data types for instructions.
  2. For Decimal symbol, select the decimal point option from the drop-down and click OK.
Decimal point option is selected for the Decimal symbol in the Customize Format window.
  1. Restart the computer to apply the changes.
  2. Re-export the training samples using the Export Training Data For Deep Learning tool.

If necessary, change the Windows display language settings to English (United States). Refer to Microsoft Support: Manage display language settings in Windows for instructions.

Article ID: 000027802

Software:
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options