ARCPY MISSING SECTIONS OF SCRIPT?

554
3
11-08-2012 04:25 AM
AaronHosford1
New Contributor
I installed the 10.1 sp1 the other day and my scripts stopped working. The following error is showing up:

Traceback (most recent call last):
File "c:\location\script.py", line 10, in <module>
import arcpy
File "d:\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module>
from arcpy.toolbox import *
File "d:\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 485, in <module>
from management import ExportTileCache as ExportTileCache_management
ImportError: cannot import name ExportTileCache

Line 10 states:  Import arcpy
Line 24 states:  from arcpy.toolbox import *
Line 485 states:  from management import ExportTileCache as ExportTileCache_management

In management.py there is no gptooldoc( ' ExportTileCache_managemet ' ).  It appears it should be between ExportReplicaSchema, line 914, and ExportXMLWorkspaceDocument but it is not.  Makes me wonder if there may be more missing or am I doing something wrong.

I have downloaded the sp1 for 10.1 desktop twice and installed several times with no change.  The model still works just not the script.
Any help would be greatly appreciated. 

Thank you
Tags (2)
0 Kudos
3 Replies
markdenil
Occasional Contributor III
Why are you importing bits of arcpy?
Why are you importing them in the middle of the script?
You have already imported the whole arcpy shebang on line 10...

just wondering.
0 Kudos
AaronHosford1
New Contributor
The only thiing i am importing is arcpy.  Those errors pop up from that.  Example:

# Import arcpy module
import arcpy

# Script arguments

Input_Features = arcpy.GetParameterAsText(0)
LOCATION = arcpy.GetParameterAsText(1)

# Local variables:
ALL_TXT_LOC = LOCATION + os.sep + "ALL_TXT"

# Process: IMPORT CAD ANNOTATIONS:

arcpy.ImportCADAnnotation_conversion(Input_Features, ALL_TXT_LOC, "1063", "ONE_CLASS_ONLY", "NO_MATCH", "NO_SYMBOL_REQUIRED", "STANDARD", "", "AUTO_CREATE", "AUTO_UPDATE")

So I am not importing bits of script or from the middle of script. 
When i run the debugger it doesnt get past import arcpy.  It spits out the previously posted error message.
0 Kudos
DavidWynne
Esri Contributor
I installed the 10.1 sp1 the other day and my scripts stopped working. The following error is showing up:

Traceback (most recent call last):
File "c:\location\script.py", line 10, in <module>
import arcpy
File "d:\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module>
from arcpy.toolbox import *
File "d:\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 485, in <module>
from management import ExportTileCache as ExportTileCache_management
ImportError: cannot import name ExportTileCache

Line 10 states:  Import arcpy
Line 24 states:  from arcpy.toolbox import *
Line 485 states:  from management import ExportTileCache as ExportTileCache_management

In management.py there is no gptooldoc( ' ExportTileCache_managemet ' ).  It appears it should be between ExportReplicaSchema, line 914, and ExportXMLWorkspaceDocument but it is not.  Makes me wonder if there may be more missing or am I doing something wrong.

I have downloaded the sp1 for 10.1 desktop twice and installed several times with no change.  The model still works just not the script.
Any help would be greatly appreciated. 

Thank you



ExportTileCache should be around line 13688 in management.py (tools are grouped by toolset).   How long is the file you have, the version I'm looking at is total 14912 lines.


-Dave
0 Kudos