|
POST
|
Ignoring whether there is an explicit error message, if the rest of the behavior described in the technical article and forums applies, it could be the same solution applies.
... View more
11-03-2014
01:37 PM
|
0
|
2
|
3396
|
|
POST
|
More similar-sounding discussion from older forums: Problem running any tool.
... View more
11-03-2014
12:19 PM
|
0
|
4
|
3396
|
|
POST
|
Have you looked at the following? Problem: On some systems, running any Geoprocessing tool in ArcToolbox results in Microsoft Script Errors and the tool dialog box appears blank The article only supposedly covers up to 10.0, but I think we had a similar issue with 10.1 too.
... View more
11-03-2014
12:13 PM
|
0
|
5
|
3396
|
|
POST
|
The getpass documentation states:
getpass.getpass([prompt[, stream]])
Prompt the user for a password without echoing. The user is prompted using the string prompt, which defaults to'Password: '. On Unix, the prompt is written to the file-like object stream. stream defaults to the controlling terminal (/dev/tty) or if that is unavailable to sys.stderr (this argument is ignored on Windows).
If echo free input is unavailable getpass() falls back to printing a warning message to stream and reading from sys.stdinand issuing a GetPassWarning.
From what you describe, it seems your code is working as expected. Are you on Windows or Linux?
... View more
11-03-2014
11:42 AM
|
0
|
2
|
5384
|
|
POST
|
I read John Baleja's comment as meaning there will be a post-10.3 solution. If there is going to be a 10.3 stop-gap solution, I look forward to learning more about it at final release.
... View more
11-01-2014
09:16 AM
|
0
|
1
|
3613
|
|
POST
|
Glad it worked out for you. I used that same discussion last year to sort through a similar issue, figured it better to point you there than repeat it all here. Cheers.
... View more
11-01-2014
08:07 AM
|
0
|
0
|
1863
|
|
POST
|
Also, there is some good information on this topic in StackExchange: How can I more efficiently select related records?
... View more
10-30-2014
11:45 AM
|
0
|
2
|
1863
|
|
POST
|
Are you using ArcGIS 10.1 or greater? If so, I encourage you to give the cursors in the arcpy data access (arcpy.da) module a try. The data access cursors are more robust and may not crash as easily.
... View more
10-30-2014
11:01 AM
|
1
|
4
|
1863
|
|
POST
|
Does your shapefile workspace only have shapefiles and your raster workspace only have rasters? That is how it looks with znshp and grd. If that is the case, your listing of shapefiles will return nothing in the first pass of the ws loop, which means the second loop won't execute. What about changing zonal_climate_fire to accept the shapefile and raster workspaces as arguments:
def zonal_climate_fire(rasWS, shpWS):
arcpy.env.workspace = rasWS
rasterlist = arcpy.ListRasters()
arcpy.env.workspace = shpWS
shplist = arcpy.ListFeatureClasses()
for k in rasterlist:
for i in shplist:
out_tbl = tbl + "\\" + k + "_ZStats"
print '==============================================='
print 'Zonal Statistics based on fire occurence : ' + k[6:-3]
print '......'
# Preform zonal statistics on the polygon file within the variable 'znlyr'
z = arcpy.gp.ZonalStatisticsAsTable_sa(i, InZnValFld, k, out_tbl, "DATA", "MIN_MAX_MEAN")
# Create a new field to add the filename information
arcpy.AddField_management(z, fieldname1, "DOUBLE")
# Create a new field to add the filename information
arcpy.AddField_management(z, fieldname2, "DOUBLE")
# Add the Year value from the filename to the new field
arcpy.CalculateField_management(z, fieldname1,k[6:-3])
# Add the Year value from the filename to the new field
arcpy.CalculateField_management(z, fieldname2,k[11:])
arcpy.Append_management(z, Template, "","","")
zonal_climate_fire(grd, znshp)
... View more
10-30-2014
07:27 AM
|
2
|
1
|
3877
|
|
POST
|
As Russell Brennan points out, this isn't currently possible with ArcPy. ArcGIS 10.3 adds 9 tools to the Geodatabase Administration toolset, but sadly, this still won't be possible natively through ArcPy or any Geoprocessing Tools with the new release. This is yet another reason retiring the SDE command line tools is premature. The use cases just keep piling up in the forums (sorry, GeoNet) where SDE command line tools work and nothing else is available, but Esri is doing their best David Farragut impersonation with this one. Unfortunately for those customers needing to script advanced geodatabase administration tasks, this isn't Mobile Bay and the mines will go off and cause damage. The sdelayer command should work for what you need, at least for the short while it will be around: sdelayer -o {grant | revoke} -l <table,column> -U <user> -A <SELECT,UPDATE,INSERT,DELETE> [-s <server_name>] [-i {<service> | <port#> | <direct connection>}] [-D <database_name>] -u <DB_user_name> [-p <DB_user_password>] [-I] [-q] Starting with ArcGIS 10.1, Esri decided to stop publishing the reference documentation for the tools online. If you install the tools, the reference documentation is there. Since the tools haven't changed much over the years, I usually just look up information in the ArcGIS 10.0 ArcSDE Administration Command Reference.
... View more
10-29-2014
08:49 PM
|
0
|
0
|
2068
|
|
POST
|
I don't think using the list or tuple function in the way described here will yield the desired result. In the original code snippet, I understand MyAttribute to be a single field/attribute, and that the goal is to populate that attribute with "ALL" or some other multi-character string. Since a multi-character string is iterable, passing MyValue to the tuple function will result in a tuple with multiple single-character items instead of a tuple with a single multi-character items, as demonstrated. The suggestion by Dallas Shearer works since it passes the update cursor a single item multi-character tuple, which is what I think the OP is after.
... View more
10-29-2014
06:20 PM
|
0
|
1
|
1712
|