|
POST
|
Luca: Can you add a print statement for each feature class that you loop through in the specified directory? This might be a clue of a problem with the shapefile name.
... View more
04-11-2012
10:41 AM
|
0
|
0
|
2097
|
|
POST
|
Luca: Can you add some print statements into your code to see that each step completes successfully? eg: print("fcList completed successfully") after the line fcList = arcpy.ListFeatureClasses() In addition, maybe print out the name of each featureclass in your fcList as there might be other data types in that folder such as a file geodatabase. Darren's comment to check for the existence of the gdb would be helpful as you would need to delete the gdb each time as it gets created early on in your python script.
... View more
04-11-2012
08:51 AM
|
0
|
0
|
2940
|
|
POST
|
When you ran this test, were you running python as "large address aware"? Maybe you could try running the same test with python with "large address aware" turned off? Unless I read the instructions incorrectly, I thought all this involved was a checkbox when directed to this .exe file.
... View more
03-26-2012
12:05 PM
|
0
|
0
|
1712
|
|
POST
|
Mathew: Thanks for the following information: Here's the post that got me going. A few other memory management tips in the thread too. http://forums.arcgis.com/threads/356...l=1#post121358 If I understand the instructions correctly, all I need to do is run the exe on the computer where the python script is running. Then I select the .exe file that I want to be "large address aware" and check it to add it. Then when I run the python script on the computer again, I will have access to more RAM? That's it. Also, if you run your script on another batch of files, can you turn off "large address aware" on the python.exe file to see if you have the memory leak issue that I am experiencing? Your assistance and feedback is greatly appreciated. Thanks.
... View more
03-26-2012
11:49 AM
|
0
|
0
|
1712
|
|
POST
|
Mathew: Sorry for my ignorance in this particular area, but how does one make a "python process large address aware"? Thank you.
... View more
03-26-2012
10:57 AM
|
0
|
0
|
1712
|
|
POST
|
Mathew: I have a incident logged with ESRI about this issue and the ESRI tech duplicated the same phenomenon on his system so he created a NIM for this bug. This is why I am surprised you are able to run your script on so many mxds. Would you be able (and willing) to run your script on a batch of mxds and see if the pythonwin.exe or python.exe process in Task Manager keeps increasing in mem usage as that is what happens on my system? I'm thinking that you might have a much more powerful system where you just never reached the mem usage threshold to lock up your python process. Your help and feedback is greatly appreciated.
... View more
03-26-2012
10:40 AM
|
0
|
0
|
2628
|
|
POST
|
Mathew: I have a few more questions about how you run your script, since I have an almost identical script that hangs up after a short time. Does your script strictly run against v10 mxds? Or can it run against previous versions of ArcGIS mxds? Does your script strictly run against SDE v10? Or can it run against previous versions of ArcSDE connections? Your feedback to this question is greatly appreciated. Thanks.
... View more
03-26-2012
09:10 AM
|
0
|
0
|
2628
|
|
POST
|
Thank you for the reply Stacy. I was using python syntax that is compatible with ArcGIS v10, but I was mistakenly running the code on an ArcGIS v9.3.1. Once I ran the code on an ArcGIS v10 machine it worked fine. This type of stuff happens as I am working in dual environments as my organization works on upgrading GIS software and GIS dependent applications.
... View more
03-23-2012
10:14 AM
|
0
|
0
|
1012
|
|
POST
|
Mathew: I freeze on different mxds depending upon the subdirectory that I choose to convert the SDE datasources for, so it is not the same file every time. Eventually I will need to convert up to 3 thousand mxds with each mxd having from 1 SDE connection to 40 or 50 SDE connections. This process will need to be done when my organization migrates from Oracle Client 10g to Oracle Client 11x, as this information is embedded in the direct connection string for every SDE connection. This is why this information is important to me.
... View more
03-22-2012
06:59 AM
|
0
|
0
|
2628
|
|
POST
|
Ganesh: Here are some changes you can make to this script: Instead of import arcgisscripting import os, sys gp = arcgisscripting.create(9.3) gp.OverWriteOutput = 1 Use import os, sys import arcpy import arcpy.mapping from arcpy import env arcpy.env.overwriteOutput = True Instead of featureClassA = gp.GetParameterAsText(0) Use featureClassA = arcpy.GetParameterAsText(0) Instead of dscB = gp.Describe(featureClassB) Use dscB = arcpy.Describe(featureClassB) I hope this gets you started to see where you need to make changes in the rest of the code for v10.
... View more
03-22-2012
06:52 AM
|
0
|
0
|
2153
|
|
POST
|
Mathew: Can you share your code of batching through 500 mxds? The reason I ask is because maybe this is the cause of the memory issue I am having with replacing SDE connections. This phenonmenon happens everytime where I get through a certain amount of mxds before python freezes up. This same problem did not occur if I batch converted sources to file geodatabases or personal geodatabases.
... View more
03-22-2012
06:29 AM
|
0
|
0
|
2628
|
|
POST
|
To All Python Users: In ArcGIS v9.3.1 I want to be able to set certain variables such as the gp.workspace from a configuration file outside the python script so it is not hard-coded in the script. I was able to read in text for other variables I needed to set but it did not work with gp.workspace as I received the following error: Traceback (most recent call last): File "G:\deptdata\GIS\GIS_Services\User\server_Scripts\01_Data_Read_Config.py", line 37, in <module> gp.workspace = "'" + source + "'" RuntimeError: NotInitialized The code to set the variable source is as follows: vars = myfile.read().rstrip().split(",") connSDE = vars[0] EOC_source = vars[1] gp.workspace = "'" + EOC_source + "'" (I have tried gp.workspace = """ + EOC_source + """ as well as gp.workspace = EOC_source Can gp.workspace be set with a variable? If so, what am I doing wrong with the syntax? Any help or hints regarding this issue are greatly appreciated. Thanks.
... View more
03-22-2012
06:18 AM
|
0
|
3
|
1212
|
|
POST
|
jacobne: What do you mean by synchronize? Do you mean putting the data together in the same projection?
... View more
03-21-2012
06:33 PM
|
0
|
0
|
2585
|
|
POST
|
renatognog: Is your data being consumed by an ArcGIS Server service or ArcIMS service? If it is I would recommend a truncate and append process that bypasses schema locks that are in place from the above mentioned services. DeleteRows_Management followed by Append_Management
... View more
03-21-2012
06:30 PM
|
0
|
0
|
826
|
|
POST
|
Mathew: I do not have an answer for your question, but I am interested in the performance of your script. I have written a replacedatasource script for SDE layers that loops through a directory searching for mxds and then resourcing the SDE layers. Unfortunately, the script eventually uses all the computer's RAM and it just hangs so I have to kill it in Task Manager. Would you know if the memory on your python script keeps increasing? Your script might not have frozen because you did not process enough mxd files in your batch. Any insight on your script and system would be greatly appreciated. Thanks.
... View more
03-21-2012
06:27 PM
|
0
|
0
|
2628
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-19-2024 10:38 AM | |
| 1 | 4 weeks ago | |
| 1 | 02-23-2026 05:32 PM | |
| 2 | 02-11-2026 10:42 AM | |
| 1 | 12-22-2025 10:08 AM |
| Online Status |
Online
|
| Date Last Visited |
Friday
|