|
POST
|
Nothing changed. The script runs every Monday and it errored out this week.
... View more
01-28-2021
01:32 PM
|
0
|
0
|
4849
|
|
POST
|
I have a script that automatically updates a sync enabled sde feature class. I populate the last_edited_date field with datetime.now(). This has worked for over a year until last week. All of a sudden I'm getting this error RuntimeError: The value type is incompatible with the field type. [last_edited_date]. Not sure what's going on. The date field in the feature class is in this format: %m/%d/%Y %H:%M%p or 1/28/2021 1:05 PM. Datetime.now() prints this format: 2021-01-28 13:06:30.180737
... View more
01-28-2021
01:07 PM
|
0
|
13
|
6878
|
|
POST
|
This was supposed to be addressed at 2.7. Still having these issues.
... View more
01-20-2021
09:15 AM
|
0
|
0
|
4840
|
|
POST
|
It is registered with the server, and I've published this way. It publishes as a regular feature service, though. Not a referenced service.
... View more
01-19-2021
08:43 AM
|
0
|
0
|
3397
|
|
POST
|
Sure, I could do that. But if I can right click and overwrite the hosted feature service in Pro, shouldn’t I be able to do the same from Python? is there a way to have the hosted feature service reflect the changes in the sde data automatically? I’d rather simplify this process.
... View more
01-19-2021
07:05 AM
|
0
|
2
|
3548
|
|
POST
|
I'm also having trouble overwriting a hosted feature service on our Enterprise Portal. I have an sde dataset that is updated weekly that we're using for a Field Maps app. I need to automate the update of the hosted feature layer. When I run the script below, I get the error: This service definition file was created for an ArcGIS Server site and must be uploaded directly to an ArcGIS Server site through ArcGIS Server Manager or ArcMap. (Error Code: 400) import arcpy
import os, sys
from arcgis.gis import GIS
prjPath = r"M:\PROJECTS\Projects_2020_21\Units_For_Field_Maps\Units_For_Field_Maps.aprx"
service = "Units_For_Field_Maps"
portal = "our enterprise portal"
user = "user"
password = "password"
shrOrg = True
shrEveryone = False
shrGroups = ""
relPath = r'C:\Temp
sddraft = os.path.join(relPath, "Units_For_Field_Maps.sddraft")
sd = os.path.join(relPath, "Units_For_Field_Maps.sd")
print("Creating SD file")
arcpy.env.overwriteOutput = True
prj = arcpy.mp.ArcGISProject(prjPath)
m = prj.listMaps()[0]
arcpy.mp.CreateWebLayerSDDraft(m, sddraft, service, "MY_HOSTED_SERVICES", "FEATURE_ACCESS","", True, True)
arcpy.StageService_server(sddraft, sd)
print("Connecting to {}".format(portal))
gis = GIS(portal, user, password)
# Find the SD, update it, publish /w overwrite and set sharing and metadata
print("Search for original SD on portal…")
sdItem = gis.content.search("{} AND owner:{}".format(service, 'user'), item_type="Service Definition")[0]
print("Found SD: {}, ID: {} n Uploading and overwriting…".format(sdItem.title, sdItem.id))
sdItem.update(data=sd)
print("Overwriting existing feature service…")
fs = sdItem.publish(overwrite=True)
if shrOrg or shrEveryone or shrGroups:
print("Setting sharing options…")
fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups)
print("Finished updating: {} – ID: {}".format(fs.title, fs.id))
... View more
01-18-2021
10:40 AM
|
0
|
4
|
3572
|
|
POST
|
Still trying to figure this out. I found this Python method for overwriting hosted feature services. It works perfectly on our test portal, but with the same dataset on our production portal I get this error from Python: Exception: Unable to publish item. This service definition file was created for an ArcGIS Server site and must be uploaded directly to an ArcGIS Server site through ArcGIS Server Manager or ArcMap. (Error Code: 400)
... View more
01-15-2021
03:12 PM
|
0
|
0
|
1384
|
|
POST
|
Turns out I transferred the wrong facilities dataset that was missing the NAME field!
... View more
01-08-2021
09:14 AM
|
0
|
0
|
1295
|
|
POST
|
It just publishes to a regular folder (not hosted) and "replaced" is highlighted.
... View more
01-05-2021
04:13 PM
|
0
|
0
|
1406
|
|
POST
|
I republished exactly as in the screenshot, and now it's just a feature layer. Not hosted or referenced. Do I need to register the data as versioned in the sde?
... View more
01-05-2021
01:24 PM
|
0
|
2
|
5185
|
|
POST
|
It is a hosted layer in the server manager. The sde data source is also registered with the server. We had an identical set up on AGOL with a proxy hosted service from our sde and standalone server. When I made edits in Pro, they showed up in the feature service immediately, and vice versa.
... View more
01-05-2021
12:20 PM
|
0
|
4
|
5211
|
|
POST
|
Yes, I was editing attributes on the sde data in Pro. There was a mistake in the Level_ID field needed for Field Maps. Should I bring the Portal Map into Pro and edit there? I'll need edits to go both ways though. The layer is sync enabled.
... View more
01-05-2021
12:10 PM
|
0
|
0
|
5217
|
|
POST
|
I thought I did publish it as a referenced feature layer?
... View more
01-05-2021
12:06 PM
|
0
|
6
|
5218
|
|
POST
|
I have a floor plan dataset in an sde. We've published this as a hosted feature layer in our Portal and copied it to the federated Server. I'm making edits in the data, but they are not showing up in my Field Maps app which contains the hosted feature layer, even after refreshing the map and signing out and back in. We've just set up our Enterprise, so I'm not totally familiar with exactly how to configure everything. We were using a standalone Server before, and this process worked.
... View more
01-05-2021
11:27 AM
|
0
|
12
|
6643
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-04-2025 04:06 PM | |
| 1 | 11-24-2025 03:59 PM | |
| 1 | 09-13-2024 10:43 AM | |
| 1 | 06-05-2025 01:26 PM | |
| 3 | 04-04-2025 10:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-08-2025
03:20 PM
|