POST
|
It seems like I attempted to explicitly delete the MXD after exporting each JPEG, but I didn't notice any difference. I'll try it again. The only thing that ever did make a difference for me was the location of the MXD files. When they were hosted on my local hard drive, the script was able to run through all of the MXDs without crashing. When they're hosted on the network, they crash at about 10 to 15 files. I don't know why that should make any difference.
... View more
07-31-2015
02:49 PM
|
0
|
0
|
719
|
POST
|
This sounds exactly like the problem I have been trying to resolve for over a year (using both 10.2 and 10.3.1) I'm attempting to loop through a list of MXDs and export the layouts as JPEGs. I can usually get about 10 to 20 maps into the process before it crashes Python completely: No traceback or error, just this popup in Windows... In my research, I found another user who posted a description of the same problem in this thread: Python Crashes when Running ExportToPDF(), ExportToPNG(), ExportToJPEG() He was able to fix it, by using a Threaded approach, which would keep the entire application from crashing, but I was unable to replicate that in my application, and it seems like a workaround at best. I thought that maybe the problem was somewhere in my code, which is moderately complex. I created a test script out of the 15 lines of code that loop through the files and export the JPEGs, and it crashes the same way. This is the code: import arcpy
import os.path
rootdir = r'C:\Maps\Idaho'
outpath = r'C:\test\output'
for (dirName, subdirList, fileList) in os.walk(rootdir):
for filename in fileList:
if os.path.splitext(filename)[1].lower() == ".mxd":
mxdfile = os.path.join(dirName, filename)
mxd = arcpy.mapping.MapDocument(mxdfile)
arcpy.mapping.ExportToJPEG(mxd, os.path.join(outpath, filename[:-3] + "jpg")) I would be interested in seeing what your code looks like. I suspect the problem is in the ExportToJPEG(), ExportToPDF(), and ExportToPNG() methods.
... View more
07-31-2015
01:05 PM
|
0
|
3
|
719
|
POST
|
Is there a way to implement something similar to the AccordionContainer in Dojo in Web AppBuilder? The ability to group layers into folders or containers would be a huge help in web apps that have more than a small number of layers. dijit/layout/AccordionContainer — The Dojo Toolkit - Reference Guide Thanks
... View more
02-17-2015
08:10 AM
|
2
|
1
|
291
|
Title | Kudos | Posted |
---|---|---|
2 | 02-17-2015 08:10 AM |
Online Status |
Offline
|
Date Last Visited |
a month ago
|