I'm have a script that we run as a scheduled task to build feature classes and we are trying to import metadata from pre-configured xml files. The ImportMetadata_conversion will run when the script is invoked on the desktop but not when invoked from ArcGIS server. Is this a bug in the 64bit version of arcpy on the server?
Solved! Go to Solution.
Apparently the arcpy Metadata conversion tools will not run on ArcGIS install using 64-bit python. Looks like we'll have to install a 32-bit ArcGIS Desktop on the server.
would be nice if you can post your current code...
import arcpy metadata = r"\\itdhq1apt90\InputData\CreateGISDataWarehouse\assets\Bridge_metadata.xml" output_bridge = r"\\itdhq1apt90\InputData\CreateGISDataWarehouse\output\Staging.gdb\Assets\Bridge" arcpy.ImportMetadata_conversion(metadata,"FROM_ARCGIS",output_bridge,"ENABLED")
Are you getting any errors?
Errors when run on server
Have you tired using full paths for your parameters, unc pathnames?
Pathnames explained: Absolute, relative, UNC, and URL
Assigning UNC Path to arcpy.env.workspace - Geographic Information Systems Stack Exchange
As you can see from the code above, I'm using UNC paths assigned to variables.
ok,
your using arcpy.ImportMetadata_conversion
try using MetadataImporter_conversion
try something like.
- # Local variables...
- sde_DEVGIS_Wetlands = "Database Connections\\HOU-SRVRNPRD2 (devgis - sde).sde\\sde.DEVGIS.DevelopmentAndTesting\\sde.DEVGIS.Wetlands"
- Wetlands_xml = "K:\\GIS Data\\Metadata\\Wetlands.xml"
- arcpy.MetadataImporter_conversion(Wetlands_xml, sde_DEVGIS_Wetlands)
Both ImportMetadata_conversion and MetadataImporter_conversion work when invoked in a test script on the desktop, but neither work when invoked by the same test script on ArcGIS server.
Apparently the arcpy Metadata conversion tools will not run on ArcGIS install using 64-bit python. Looks like we'll have to install a 32-bit ArcGIS Desktop on the server.