1

I work with arcview 10.3. Every time i export maps with ecw raster format , python (version 2.7.8) get crashed and i see:enter image description here

I use this code:

import arcpy,os,sys,string
import arcpy.mapping
from arcpy import env

env.workspace = r"C:\yaron\shonot\software\gis\maps\gis"
counter = 0
for mxd in arcpy.ListFiles("*.mxd"):
    print (mxd) # print list of mxd's in the folder
    mapdoc = arcpy.mapping.MapDocument(r"C:\yaron\shonot\software\gis\maps\gis\\" + mxd)
    arcpy.mapping.ExportToJPEG(mapdoc, r"C:\yaron\shonot\software\gis\maps\gis\output\\"+os.path.basename(mapdoc.filePath).replace ('.mxd','') +".jpg",resolution=196)
    print ('ExportToJPEG')
    mapdoc.save()
    counter = counter + 1
del mxd 
print (counter)
  • What happens if you try to export that particular map to JPEG using the ArcMap GUI instead of ArcPy? – PolyGeo Feb 24 '15 at 10:16
  • What if you replace the double backslash at the end of the paths by a single one (in 'mapdoc = ...' and 'arcpy.mapping.ExportToJPEG(...')? – GISGe Feb 24 '15 at 10:26
  • GISGe,arcpy still crashed. – newGIS Feb 24 '15 at 11:14
  • 1
    And how do you run your script? from the Python window, as a script tool, from a IDE...? – GISGe Feb 24 '15 at 12:18
  • 2
    There is a bug in 10.3 - BUG-000083185 - Memory leak in arcpy.mapping export functions - maybe that's what you're experiencing. Not a lot of details in the description but it will be fixed in 10.3.1. Contact Esri Tech support if you want to confirm this. – GISGe Feb 24 '15 at 13:33
0

The problem was the ecw file.

In ArcMap 10.3 python gets stuck with the ecw file.

I converted the ecw to tif. file

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.