|
POST
|
I think this is one place, amongst many, where ESRI can improve the error messages in python. The error message "Runtime error <type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function" is so generic that it is hard to pinpoint what the exact problem is with the code. It would have been nice if the error message could inform the developer that it was looking for a prj file and not a text string that was representing the name of the projection.
... View more
05-09-2012
08:16 AM
|
0
|
0
|
988
|
|
POST
|
Does anyone from ESRI have any feedback on this issue? I am interested because in 9.3.1 I use a Composite Address Locator style that I am able to rebuild with RebuildAddressLocator_geocoding with python 2.6 from ArcGIS v10.0, so I am curious if an actual Composite Locator that I create in v10.0 will not get rebuilt with this function in python. Are there any general Rebuild issues in v10.0 besides the Composite Locator as I get this error with a Single Field locator? ERROR 000005: Could not open the address locator. Failed to execute (RebuildAddressLocator). Any help or hints regarding this issue are greatly appeciated. Thanks.
... View more
05-08-2012
11:52 AM
|
0
|
0
|
2286
|
|
POST
|
halyazeedi: I think you would need to modify the script from thales007 to have the destination path be a connection to SDE that you have saved on your computer with ArcCatalog. The third line with findAndReplaceWorkspacePaths is a composite of the 1st two lines (that have been commented out) where the source is the current shapefile and the destination is the SDE geodatabase. You might have some issues with field types in the transition from shapefiles to SDE that you would need to work through. You would also need to ensure that you have read access to all the associated feature classes in SDE from the SDE connection that you are using. import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_default.mxd") 'mxd.findAndReplaceWorkspacePaths(r"C:\Project\Data", r"C:\Project\Data2") 'mxd.findAndReplaceWorkspacePaths(r"C:\Project\Connection to Default.sde", r"C:\Project\Connection to Version1.sde") mxd.findAndReplaceWorkspacePaths(r"C:\Project\Data", r"C:\Project\Connection to Version1.sde") mxd.saveACopy(r"C:\Project\Project_V1.mxd") del mxd
... View more
05-08-2012
09:41 AM
|
0
|
0
|
3796
|
|
POST
|
I would create a bat file such as this that would call the python script(s) that you created. I have additional documentation that is sent to the log file to help indentify when each script is being run. Just give it a file name such as Update.bat @echo off echo Start time: %time% > update_data.log echo ------------ Start time: %time% echo ------------ Refreshing Database ----------------------- echo ------------ Refreshing Database ----------------------- >> update_data.log 01_Data.py >> update_data.log echo End time: %time% echo ' ' >> update_data.log echo End time: %time% >> update_data.log @echo on I hope this helps.
... View more
05-02-2012
10:28 AM
|
0
|
0
|
1295
|
|
POST
|
To All ArcGIS Users: In ArcGIS v10 I created an address locator using the US Streets with Zone locator style. With this style, the address locator asked the user for an address plus a zone to input. In ArcGIS v10 I tried using the US Address - Dual Ranges to duplicate this style. The problem is that there is no input box for the user to enter the zone to limit the returned results. Does anyone know of another address locator that would provide this default functionality? If not, how would one add this functionality to a locator style file? Any help or hints are greatly appreciated. Thanks.
... View more
05-02-2012
05:20 AM
|
0
|
4
|
3327
|
|
POST
|
Does anyone from ESRI know if this is a version difference problem? Any help or hints are greatly appreciated. Thanks.
... View more
04-30-2012
02:13 PM
|
0
|
0
|
329
|
|
POST
|
To All Python Scripters: I am trying to upgrade my environment from ArcMap v9.3.1 to ArcMap v10.0. As part of this upgrade, I am updating python scripts. One of these scripts needs to update an Address Locator that is built in ArcMap v9.3.1. When I get to the script to rebuild the Address Locator in python run on a machine with ArcMap v10.0, I get the following error: ERROR 000005: Could not open the address locator. Failed to execute (RebuildAddressLocator). Am I getting this error because I am trying to rebuild the Address Locator with python scripting for ArcMap v10.0 while the Address Locator has been built in ArcMap v9.3.1? Any help or feedback with regard to this topic is greatly appreciated. Thanks.
... View more
04-27-2012
11:25 AM
|
0
|
1
|
449
|
|
POST
|
Janet: I have had to perform this task in older versions of ArcMap as well where python did not have its current capabilities so VBA was used. In each case, whether it be in python or VBA, a corrupt mxd always crashed the script even with error handling such as try...except was used. I have spoken with ESRI Technical representatives and they have confirmed that there is no way around a corrupt mxd in VBA or python scripting except to exclude it all together from your loop. In my case, I had a script that would take an inventory of all mxds and various connections such as SDE. This was a read-only step where information was saved to an output text file. When the script would crash on a corrupt mxd, it would be noted and added to the code for the other script, that modified paths to data, so that script would just bypass these corrupt files and hopefully never crash. I hope this information helps you to come up with a solution.
... View more
04-27-2012
10:10 AM
|
2
|
4
|
2182
|
|
POST
|
Robert: I have a question in regards to this application. The code is written against the Flex API where the application is stored on an IIS Server, the GIS mapservices orginate from a different IIS Server that has ArcGIS Server with a crossdomain.xml in place for all mapservices, and the images are stored on another IIS Server. Would the IIS server where the images are stored need to have its own crossdomain.xml file so the application Flex API can access these images? Your feedback is greatly appreciated.
... View more
04-23-2012
06:53 AM
|
0
|
0
|
729
|
|
POST
|
Question about the importance of this script: Is this your companies (organization's) policy to convert shapefiles to file geodatabases? Or is ESRI dictating this move because shapefiles are going to be deprecated in the near future?
... View more
04-20-2012
12:26 PM
|
0
|
0
|
968
|
|
POST
|
Luca: I just looked at the script that I use to reproject feature classes and I pass a string representation of the out_coor_system, as opposed to the .prj file that you are using. Maybe you can get the string representation of the out_coor_system instead of the .prj file and see if that works. My out_coor_system is different from yours so it would not help you. If you say using the .prj file in an out-of-the-box tool worked, but the python script did not work then you might want to log an incident with ESRI Technical support as I would think both instances are running the same behind the scenes code. Also in my script, I need to add the appropriate toolboxes in order for the python script to run as below: # Load required toolboxes... arcpy.AddToolbox("C:/Program Files (x86)/ArcGIS/Desktop10.0/ArcToolbox/Toolboxes/Data Management Tools.tbx") Your path to the toolbox might be slightly different depending upon your operating system. I hope this info helps.
... View more
04-17-2012
09:05 AM
|
0
|
0
|
1077
|
|
POST
|
Luca: I would first check to see if the prj file is correct. Take one of the feature classes in your file geodatabase and set it to the indicated projection within ArcMap or ArcCatalog. If this fails, it might indicate an issue with your prj file. Also, are these feature classes already in a projection. If so, maybe you do not need to use the arcpy.SpatialReference method, but go directly to arcpy.Project_management. I have a python script where I reproject multiple feature classes in a loop which already have a projection and I just use the arcpy.Project_management method to accomplish this task.
... View more
04-13-2012
06:47 AM
|
0
|
0
|
1077
|
|
POST
|
Luca: I believe the ESRI documentation for FeatureClassToGeodatabase_conversion answers this question http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000021000000 �?�The name of the output feature classes will be based on the name of the input feature class name. For example, if the input is C:\base\streams.shp, the output feature class will be named streams. �?�If the name already exists in the output geodatabase, a number will be appended to the end to make it unique, for example, "_1". Using FeatureClassToGeodatabase_conversion works properly because when it hits an input feature class with the same name it appends a _1 to the name of the second instance and so on _2 for the third instance instead of throwing an error.
... View more
04-12-2012
07:37 AM
|
0
|
0
|
1077
|
|
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
|
1077
|
|
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
|
1099
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Monday | |
| 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
|