Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 13911

A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

13 votes
Accepted

Can arcpy.env.workspace be set multiple times in same script?

If 10.1+, you can use arcpy.da.Walk and not touch the global arcpy environments: from os.path import join import arcpy def find_all_fcs(workspace): """ return list of all fcs """ fcs = [] … # optional join for fullpath instead of just fc name fcs.append(join(dirpath, filename)) return fcs Otherwise, I usually do this to avoid any surprises later on: import arcpy
Josh Werts's user avatar
1 vote
Accepted

Geocoding arcpy slow startup time

This appears to have been fixed in ArcGIS 10.4+. Startup time is on the order of a couple seconds instead of a couple minutes.
Josh Werts's user avatar
17 votes
4 answers
4k views

Refreshing imported modules in ArcGIS Python Toolbox?

When using a python toolbox (.pyt) in ArcMap, I'll typically follow a pattern where the .pyt file itself is simply a wrapper to collect input arguments and define the tools themselves. Supporting cod …
Josh Werts's user avatar
1 vote
2 answers
237 views

Geocoding arcpy slow startup time

When scripting with arcpy.GeocodeAddress_geocoding (http://resources.arcgis.com/en/help/main/10.2/index.html#//002600000006000000), there's always a major lag to start up the geocoder. The issue here …
Josh Werts's user avatar
3 votes
Accepted

arcpy license: import arcserver is ignored at 10.3.1

I found an easy fix to this issue. Uninstall 64-bit Background Geoprocessing for ArcMap From python command line: import arcserver (This seems to setup several things on first run). Re-install 64-bi …
Josh Werts's user avatar
2 votes
2 answers
485 views

arcpy license: import arcserver is ignored at 10.3.1

. >>> import arcserver >>> import arcpy >>> arcpy.ProductInfo() u'ArcEditor' Not sure what's up here. … Edited to show that no other module or process had already imported arcpy. …
Josh Werts's user avatar
0 votes
0 answers
1k views

Geprocessing Service: ERROR 000816: The tool is not valid. .Pyt file is fine but .tbx has re...

I have a .pyt Python toolbox which runs fine in ArcMap and then gives the dreaded "ERROR 000816: The tool is not valid" when published as a GP Service. I've dealt with this issue many times before, b …
Josh Werts's user avatar
1 vote
0 answers
63 views

Reading output spatial reference from geoprocessing service in Python toolbox (.pyt) service?

I know I could just create a custom parameter but it seems there's already a built in method here to specify the output spatial reference - I just have no idea how to read it. I've tried checking arc …
Josh Werts's user avatar