Select to view content in your preferred language

Error using Python to create a TPK basemap package

945
1
Jump to solution
08-09-2018 12:00 PM
Brian_McLeer
Frequent Contributor

I am trying to implement a Python routine to update a Map Tile Package that will be used for offline map downloads with Lattitude Geographics GeoCortex product. The code snippet below was an output from Model Builder. The model ran successfully and updated the TPK. When running in Python, the generic error code appears (which isn't helpful):

ERROR 999999: Error executing function.
Failed to execute (CreateMapTilePackage).

Looking for insight to see if anyone else has had this problem. 

Some troubleshooting I have done without different results:

   - Run the model from within Python calling the model from a toolbox

   - Change file paths for invalid characters

   - Tried another machine

I am on ArcGIS Desktop 10.3.1 on a Windows 8.1 system and Python version is 2.7.8. 

import arcpy, os

arcpy.env.overwriteOutput = True

# Process: Create Map Tile Package
 arcpy.CreateMapTilePackage_management("C:\\Path\\To\\MXDtoBeUsed.mxd", "ONLINE", "C:\\Path\\To\\TPKtobeUsed.tpk", "PNG", "4", "", "TPKforGMAF", "Basemap")‍‍‍‍‍‍‍‍‍‍
Brian
0 Kudos
1 Solution

Accepted Solutions
Brian_McLeer
Frequent Contributor

Update, the issue seems to be on machines having the Background 64-bit GeoProcessing patch installed. 

Brian

View solution in original post

0 Kudos
1 Reply
Brian_McLeer
Frequent Contributor

Update, the issue seems to be on machines having the Background 64-bit GeoProcessing patch installed. 

Brian
0 Kudos