DOC
|
@Levon_H try adding the following line after the Geodatabase is deleted, but before it attempts to remove the zipped geodatabase: arcpy.management.ClearWorkspaceCache(arcpy.env.scratchFolder) Ex: # Delete temporary File Geodatabase and zip file
print("Deleting temporary FGD and zip file")
arcpy.Delete_management(gdb)
arcpy.management.ClearWorkspaceCache(arcpy.env.scratchFolder)
os.remove(gdb + ".zip")
... View more
Thursday
|
0
|
0
|
104
|
DOC
|
@Levon_H do you get the same error when trying to delete the zip file manually?
... View more
Thursday
|
0
|
0
|
120
|
DOC
|
@Levon_H @Chase_RSO do you get an error if you manually delete the zip file? Instead of deleting, are you able to move the zip file? Ex: shutil.move(os.path.join(arcpy.env.scratchFolder, "TempGDB.gdb.zip"), os.path.join(r"C:\temp\TempGDB.gdb.zip")) I'm wondering if you try moving the file to another directory first, you can then delete it using the os.remove command.
... View more
Wednesday
|
0
|
0
|
184
|
DOC
|
@RickeyFight , You will need to apply the token to your params when querying the service: params = {'f': 'pjson', 'where': "1=1", 'outFields' : '*', 'statisticType' : 'count', 'returnGeometry' : 'false', 'token' : token}
... View more
Wednesday
|
0
|
0
|
230
|
DOC
|
@RickeyFight looks like your portal URL is incorrect for generating the token. Replace your # Generate Token portion of the script with the following: # Generate Portal token
tokenURL = 'https://gis.ashland.or.us/portal/sharing/rest/generateToken/'
params = {'f': 'pjson', 'username': username, 'password': password, 'referer': 'https://gis.ashland.or.us'}
r = requests.post(tokenURL, data = params, verify=False)
response = json.loads(r.content)
token = response['token']
print(token)
... View more
Wednesday
|
0
|
0
|
257
|
DOC
|
@RickeyFight if the token is not printing, it's erroring within that portion. Do you know if you have Windows Authentication enabled for your Portal? For example, if you go to Portal, does it sign you in automatically?
... View more
Wednesday
|
0
|
0
|
282
|
POST
|
Hi @McKinneyPatrickPAContractor, arcgis are 'built-in' accounts. Meaning, these accounts are stored within ArcGIS Online. enterprise are organization-specific identity store accounts. For example, you can configure SAML logins with ArcGIS Online
... View more
Wednesday
|
0
|
0
|
36
|
POST
|
Hi @JasminePrater, I believe the Enterprise Reporter tool will do this.
... View more
Wednesday
|
0
|
0
|
46
|
DOC
|
@RickeyFight check to make sure your token is being generated, (i.e. Add a statement: print(token) ).
... View more
Wednesday
|
0
|
0
|
311
|
DOC
|
@RickeyFight add a print statement before line 68: print(response) What does this return?
... View more
Wednesday
|
0
|
0
|
321
|
DOC
|
@RickeyFight , Change the below lines: tokenURL = 'https://www.arcgis.com/sharing/rest/generateToken'
params = {'f': 'pjson', 'username': username, 'password': password, 'referer': 'http://www.arcgis.com'} to the following: tokenURL = 'https://<portalURL>/<webadaptor>/sharing/rest/generateToken/'
params = {'f': 'pjson', 'username': username, 'password': password, 'referer': '<portalURL>'} Replace the <portalURL>/<webadaptor> with the URL to your portal (i.e. https://gis.esri.com/portal). And, the referer to the portal URL (i.e. https://gis.esri.com).
... View more
Wednesday
|
0
|
0
|
343
|
DOC
|
@RickeyFight can you describe what your doing when you say you locked down the service? Are you only sharing the service to your Organization?
... View more
Tuesday
|
0
|
0
|
381
|
POST
|
Hi @KåreMølgaardRasmussen, The below sample will export the attachments to a directory: import os, arcpy
# Variables
tbl = r"C:\Temp\Python\Test.gdb\Graffiti__ATTACH" # Path to attachment table
fldBLOB = 'DATA' # Field name of Blob data type field in attachment table
fldAttName = 'ATT_NAME' # Field name in attachment table that contains attachment name
outFolder = r"C:\Temp\Python\Attachments" # Output folder to export attachments to
with arcpy.da.SearchCursor(tbl,[fldBLOB,fldAttName]) as cursor:
for row in cursor:
binaryRep = row[0]
fileName = row[1]
# save to disk
open(outFolder + os.sep + fileName, 'wb').write(binaryRep.tobytes())
print('Finished')
... View more
Tuesday
|
0
|
0
|
104
|
POST
|
Hi @RobertoRossi, 1. Set your Map's coordinate's system to a Projected Coordinate system 2. Change the Map's units at the bottom to the measurement of your choice The Edit Vertices should now reflect this. Ex:
... View more
Tuesday
|
1
|
0
|
58
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
2 | Monday | |
1 | Monday | |
1 | 3 weeks ago | |
1 | 4 weeks ago |
Online Status |
Offline
|
Date Last Visited |
Friday
|