Occurrence:
The following error message occurs when attempting to import a Geosoft Grid into ArcGIS Pro Enterprise SDE database (*.sde).
Import Geosoft Grids (geosoftarcpy)
Failed
Parameters
Geosoft Grids: ***
Overwrite existing datasets:
Add layers to current map: ***
Output Geodatabase: ***
Messages
Start Time: ***
Running script ImportGeosoftGrids...
Traceback (most recent call last):
File "<string>", line 43, in execute
File "C:\Users\igors\AppData\Local\Programs\Geosoft\Target for ArcGIS Pro - Testing\toolbox\geosoftarcpy\gptool.py", line 30, in execute
self._execute(parameters, messages)
File "C:\Users\igors\AppData\Local\Programs\Geosoft\Target for ArcGIS Pro - Testing\toolbox\geosoftarcpy\gptools\raster\import_geosoft_grids.py", line 108, in _execute
grd.save_as_raster(out_dataset)
File "C:\Users\igors\AppData\Local\Programs\Geosoft\Target for ArcGIS Pro - Testing\toolbox\geosoftarcpy\geosoftgrid.py", line 164, in save_as_raster
self._save_as_raster_via_3rd_party(out_raster)
File "C:\Users\igors\AppData\Local\Programs\Geosoft\Target for ArcGIS Pro - Testing\toolbox\geosoftarcpy\geosoftgrid.py", line 148, in _save_as_raster_via_3rd_party
self._save_as_raster_flt(out_raster)
File "C:\Users\igors\AppData\Local\Programs\Geosoft\Target for ArcGIS Pro - Testing\toolbox\geosoftarcpy\geosoftgrid.py", line 116, in _save_as_raster_flt
arcpy.management.CopyRaster(temp_flt, os.path.abspath(out_raster))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 15922, in CopyRaster
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 15919, in CopyRaster
retval = convertArcObjectToPythonObject(gp.CopyRaster_management(*gp_fixargs((in_raster, out_rasterdataset, config_keyword, background_value, nodata_value, onebit_to_eightbit, colormap_to_RGB, pixel_type, scale_pixel_value, RGB_to_Colormap, format, transform, process_as_multidimensional, build_multidimensional_transpose), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Underlying DBMS error [[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '–'.] [test.DBO.Schefferville_Mistastin_Batholith__QC_NL___50m___Residual_Total_Field_–_Composante_residuelle_du_champ_total]
No spatial reference exists.
Failed to execute (CopyRaster).
Failed to execute (ImportGeosoftGrids).
Resolution:
- Open Windows Explorer and locate the Geosoft Grid (*.grd).
- Rename the Geosoft Grid file so it no longer includes an special characters.
- NOTE: you will need to rename all files associated with the Geosoft Grid: *.grd, *.gi, and *.xml.
Root Cause
The error message occurs because there are special characters in the name of the Geosoft Grid (*.grd) that are conflicting with character limitations in the ArcGIS Pro Enterprise SDE database (*.sde)