|
POST
|
Luca: You get the error because you had already copied a feature class with that name from a file geodatabase in the directory that you were looping through. If you only want to process shapefiles into the new file geodatabase, then you need to filter out data based on its source (only process shapefiles). I hope this helps.
... View more
04-12-2012
07:23 AM
|
0
|
0
|
1108
|
|
POST
|
Try putting in outWorkspace + "\\" + fc.strip(".shp"). You might have issues with "\ as an escape character so you might want to change your code to use / instead of \ as this is the full path to the output feature class including its name. I would also strongly advise getting some ESRI training on python scripting if your manager allows this. You would speed up your python scripting learning curve tremendously.
... View more
04-12-2012
07:10 AM
|
0
|
0
|
1172
|
|
POST
|
Luca: In the ESRI documentation for CopyFeatures_management, the first required parameter is the input feature which looks correct. The second required parameter is the output feature class. It looks like you are providing a workspace instead of the name of the output feature class.
... View more
04-12-2012
06:57 AM
|
0
|
0
|
1172
|
|
POST
|
Luca: In the line arcpy.CopyFeatures_management(fc, outWorkspace) can you change fc to outFeatureClass Also can you move the statement print os.path.join(workspace, fc, "TO GDB") above the statement arcpy.CopyFeatures_management(fc, outWorkspace) as this is where the error is occurring.
... View more
04-12-2012
06:31 AM
|
0
|
0
|
1172
|
|
POST
|
Luca: Can you provide the feedback you get for both scenarios from the print statements? Also, for the code where you get ERROR 000601, can you make sure you do not have the file geodatabase that you are trying to delete open in ArcMap or ArcCatalog on your computer as that might be putting a lock on the file geodatabase. You also might want to close out of the application that you are running python through as well (e.g. IDLE or pythonwin) as that might also have a lock on the file geodatabase if you had an error in the middle of running the script.
... View more
04-12-2012
06:15 AM
|
0
|
0
|
1172
|
|
POST
|
Can you provide a screenshot of the error message you get, as well as the latest version of the code that you are running?
... View more
04-12-2012
05:53 AM
|
0
|
0
|
1311
|
|
POST
|
Luca: Can you add the print statement for the feature classes in fcList earlier on in the loop before python hits the error? Here is where I would put additional print statements for debugging purposes: # Execute CopyFeatures for each input shapefile for shapefile in fcList: # Determine the new output feature class path and name print("The feature class " + shapefile + " now has the focus") outFeatureClass = os.path.join(outWorkspace, shapefile.strip(".shp")) print("The path to the feature class that has the focus is " + outFeatureClass) arcpy.CopyFeatures_management(shapefile, outFeatureClass) You might need to change shapefile and outFeatureClass variables to strings if python says they are not in the correct format to be printed out. I think this might provide some additional clues to the problem of python seeing the shapefile that you want copied into the file geodatabase.
... View more
04-12-2012
04:52 AM
|
0
|
0
|
1311
|
|
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
|
1311
|
|
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
|
1872
|
|
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
|
1014
|
|
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
|
1014
|
|
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
|
1014
|
|
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
|
1602
|
|
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
|
1602
|
|
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
|
643
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-22-2025 10:08 AM | |
| 1 | 09-26-2025 06:10 AM | |
| 1 | 09-04-2025 02:19 PM | |
| 1 | 08-29-2025 08:29 AM | |
| 1 | 08-21-2025 12:45 PM |
| Online Status |
Online
|
| Date Last Visited |
7 hours ago
|