'Features to GPX' Tool Failed to Execute

258
2
Jump to solution
10-25-2021 03:53 AM
Labels (1)
BrianMoT
New Contributor III

I try to use 'Features to GPX' tool to convert a bicycle path to GPX and it is failed to execute.

I have created 4 fields: name, desc, elevation, time, and do not modify the tool used as it is. 

Maybe somebody had such a problem and know the solution?

Copy of Error:

Features To GPX
=====================
Parameters

Input Features Anyksciai_niuronys_GPX_experimentams
Output GPX File C:\Users\User\Documents\ArcGIS\Projects\ANK dviraciu takai\Anyksciai_Niuronys4.gpx
Name Field Name
Description Field desc
Z Field elevation
Date Field time
=====================
Messages

Start Time: 2021 m. spalio 25 d., pirmadienis 13:10:41
Failed script (null)...
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\FeaturesToGPX.py", line 206, in <module>
featuresToGPX(inputFC, outGPX, name, descript, z_field, datetimes)
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\FeaturesToGPX.py", line 56, in featuresToGPX
gpxFile.write(prettify(gpx))
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u010d' in position 210: character maps to <undefined>

Failed to execute (FeaturesToGPX).
Failed at 2021 m. spalio 25 d., pirmadienis 13:10:43 (Elapsed Time: 1,98 seconds)

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

First, try a shorter output file name and path without spaces.

Second, since the issue appears to be a position 210, it might be some untranslateable character in a field, perhaps in your description field.  

I would begin to examine your data fields and identify those that have large entry values (more than 210 characters) and look for internationalized characters, or other symbols that it may be having trouble translating. Perhaps it doesn't have the codec needed to do so.


... sort of retired...

View solution in original post

2 Replies
DanPatterson
MVP Esteemed Contributor

First, try a shorter output file name and path without spaces.

Second, since the issue appears to be a position 210, it might be some untranslateable character in a field, perhaps in your description field.  

I would begin to examine your data fields and identify those that have large entry values (more than 210 characters) and look for internationalized characters, or other symbols that it may be having trouble translating. Perhaps it doesn't have the codec needed to do so.


... sort of retired...
BrianMoT
New Contributor III

Thank you! That worked! The name and description were with symbols from the Lithuanian language which is not accepted for GPX file.

0 Kudos