|
POST
|
Yes! I just tried it myself and it does indeed work. Thanks so much. I'm still curious why it works with one web server but not the other but I'll probably just change my code and move on.
... View more
03-04-2025
12:42 PM
|
0
|
0
|
717
|
|
POST
|
I have a script that updates ArcGIS Online item thumbnails from images stored on our web server. We moved the images to a different web server and now the updates are failing with 'Could not identify file'. There is no problem accessing the image via URL. When I compare browser network traces accessing it on the old server and the new server I don't see anything obviously different. I expanded the image to 600x400 since that is the recommended minimum size with no luck. I've attached a script that can be run to recreate the problem. I'm planning on opening a ticket with ESRI, but thought I'd post it here first in case anybody has any ideas. I'm running on Python 3.11.10 from ArcGIS Pro 3.4.0 # To recreate problem
# 1. Update the ITEM_ID variable below to an ArcGIS online item that you own
# 2. Copy this entire script file and paste it into the ArcGIS Pro (make sure you are signed in)python analysis window, hit enter twice
# 3. Enter run_test()
ITEM_ID = '758054a99d934a9d9113d8a5faccf456'
from arcgis.gis import GIS
import requests
def test_upload_as_thumbnail (item, url):
try:
item.update(thumbnail = url)
print (f"Upload {url} to {item.id} as thumbnail succeeded")
except Exception as ex:
print (f"Upload {url} to {item.id} as thumbnail failed: {str(ex)}")
return
def test_download (url):
try:
requests.get(url).content
print (f"Download {url} succeeded")
except Exception as ex:
print (f"Download {url} failed: {str(ex)}")
return
def run_test():
gis = GIS('pro')
for url in ['http://maps.fieldmuseum.org/apps/ROWHWG/icons/FeatureLayer.png', # this one works
'https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer_600_400.png', # this one fails
'https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer.png']: # this one fails
test_download (url)
test_upload_as_thumbnail(gis.content.get(ITEM_ID), url) Here is the output I get from the test script: Download http://maps.fieldmuseum.org/apps/ROWHWG/icons/FeatureLayer.png succeeded Upload http://maps.fieldmuseum.org/apps/ROWHWG/icons/FeatureLayer.png to 758054a99d934a9d9113d8a5faccf456 as thumbnail succeeded Download https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer_600_400.png succeeded Upload https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer_600_400.png to 758054a99d934a9d9113d8a5faccf456 as thumbnail failed: Could not identify file Download https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer.png succeeded Upload https://rightofway.erc.uic.edu/wp-content/uploads/FeatureLayer.png to 758054a99d934a9d9113d8a5faccf456 as thumbnail failed: Could not identify file
... View more
03-04-2025
11:33 AM
|
0
|
2
|
741
|
|
POST
|
I turned on the ArcGIS Pro diagnostic monitor (ctl atl m) to see what was happening during the publish from ArcGIS pro and it appears the code was spinning on repeatedly (millions of times) opening database files and maps that just happened to be in my project. Those maps and database connections were not relevant to the publish so I removed them from the project and it made a huge difference. The analyzer finished in about 2 minutes so I think that explains the difference. When I run the publish from a standalone script there is no project involved.
... View more
01-06-2025
04:24 PM
|
0
|
0
|
420
|
|
POST
|
Same issue here. I'm actually trying to overwrite a hosted tile layer on ArcGIS online. I can't get that to work so now I want to simply delete it and create a new one - but I can't even do that due to this error.
... View more
12-27-2024
10:47 AM
|
0
|
0
|
1399
|
|
POST
|
I have a python (ArcGIS Pro 3.3.2) script that created a raster file then published it to ArcGIS Online as a Tile Layer item using this series of instructions sharing_draft = map_.getWebLayerSharingDraft("HOSTING_SERVER", "TILE", rest_id)
sharing_draft.serviceName = rest_id
sharing_draft.summary = snippet
sharing_draft.tags = tags
sharing_draft.description = description
sharing_draft.portalFolder = None
sharing_draft.overwriteExistingService = True
sharing_draft.credits = attribution
# Create Service Definition Draft file
sddraft_output_filename = os.path.join(arcpy.env.scratchFolder, rest_id + ".sddraft")
sharing_draft.exportToSDDraft(sddraft_output_filename)
sd_output_filename = os.path.join(arcpy.env.scratchFolder, rest_id + ".sd")
arcpy.StageService_server(sddraft_output_filename, sd_output_filename)
rsp = arcpy.UploadServiceDefinition_server(sd_output_filename, "HOSTING_SERVER") That works great but now I want have an updated raster and I want to overwrite the data original ArcGIS Online Tile Layer item. I thought that since I'm setting "overwriteExistingService" that it would work as is, but instead I get this error on the UploadServiceDefinition call: arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Service name 'Access_to_Nature_Raster' already exists for 'dJOijx2lWTlGQBDJ'
Failed to execute (UploadServiceDefinition). I looked inside the sddraft file to verify the the Type setting is 'esriServiceDefinitionType_Replacement'. What is the trick to making this work?
... View more
12-26-2024
12:59 PM
|
0
|
1
|
693
|
|
POST
|
I just check the logs of my geoprocessing tasks running on our 11.3 server and I'm not seeing the same thing. My code uses the arcpy.env.scratchGDB setting and it appears to be putting things in the right place. Here is an example 2024-12-17 12:41:07,960 - Temporary feature class C:\arcgisserver\directories\arcgisjobs\row_as_habitat\analyzebeeoccurrence_gpserver\jd6c0f33269f649b8a0551b4440c939e5\scratch\scratch.gdb\row_buffered_centerlines_319048053 I don't have access the server so I can't say for sure if the files are getting clean up, but I'm assuming so.
... View more
12-17-2024
10:49 AM
|
0
|
3
|
1455
|
|
POST
|
"opaque and usually incorrect" - totally true. I can't think of a worse combination.
... View more
12-17-2024
10:11 AM
|
1
|
0
|
3720
|
|
POST
|
I confirmed this morning that if I add each task as a separate custom web tool utility (instead of adding the REST service as the utility) then I can easily add future tasks. This is what it now looks like:
... View more
12-13-2024
09:38 AM
|
1
|
0
|
1182
|
|
POST
|
Yes - you are correct and this helped me figure it out. When I added my first set of 6 custom tools. I specified the shorter URL of the service which seemed smart at the time because Web Experience Builder recognized that there were multiple tasks and added them all to my list of tools. I ended up with this: However when I added a new task to the service (Task7) I couldn't get it to refresh the list and let me configure Task7. I think what I should have done is from the beginning, add each of the 6 original tasks separately their full task URLs - in other words never use the shorter service URL if you might add tasks to the service. Then later on I hopefully can add Task7 with its full task URL. I'll try to test this in the next couple of days to verify.
... View more
12-12-2024
08:34 PM
|
0
|
1
|
1196
|
|
POST
|
I've been struggling with this for years and have spent an enormous amount of time working around this problem. I don't have access to the server where I could view the source code alterations, so that makes it even worse. I don't know of any other situation where a component would alter my code in this fashion and I think is was a big mistake by ESRI to design it this way. It is absolutely the most unproductive environment I've ever coded in (pushing 50 years) There must be a better way to provide portability between execution platforms. A couple other tips Avoid "f" strings Avoid non-trivial expressionsas parameters on arcpy calls
... View more
12-11-2024
08:35 AM
|
2
|
2
|
3821
|
|
POST
|
I'm using the Analysis widget to add Custom Web Tools. I do have a URL and I can add the tools associated with my geoprocessing REST service that runs on our ArcGIS server. The problem is when I add a new task to the REST service, I can't figure out how to add a new custom web tool Web Experience Builder that references that REST service task. My Web Experience Builder is on ArcGIS Online so I don't think there are any portal settings involved.
... View more
12-09-2024
05:07 PM
|
0
|
4
|
1243
|
|
POST
|
I created a geoprocessing REST service on our ArcGIS server. That service has a number of tasks that I expose to users as ArcGIS Online Web Experience Builder custom tools. It all works great. I recently added an additional task to the existing REST service and would like to add an associated custom tool in Web Experience Builder but I can't figure out how to get Web Experience Builder to recognize that a new task exists, so I can't configure it. How can I do this (without deleting the existing custom tasks or manually editing the JSON in ArcGIS Online Assistant)?
... View more
12-07-2024
07:19 AM
|
0
|
6
|
1312
|
|
POST
|
Thanks Nick. I did a quick test and it didn't seem to work as I expected. It's going to take me a week or so to get back and dig in deeper. I'll let you know what I find out
... View more
11-22-2024
04:09 PM
|
0
|
0
|
507
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 08-11-2025 09:19 PM | |
| 2 | 08-07-2025 11:47 AM | |
| 1 | 01-18-2022 07:15 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|