|
POST
|
I ran the script from another server that has version 3.1.2 installed and although I am not getting the 'argument' error any more, I do still get the '...outside an edit session' error. I am fairly certain that this is not an issue with the script, but an admin issue with the .sde or maybe the feature dataset that contains the FC. I notified the database administrator of the issue and if they can't fix it on their end I'll just open a ticket.
... View more
09-29-2023
12:19 PM
|
0
|
0
|
1676
|
|
POST
|
That could be the issue. The server that I need to run the script from currently has 2.9.3 installed. Thanks for catching that, most of our servers have been updated to 3x so I just assumed that this server had been updated as well.
... View more
09-29-2023
10:55 AM
|
0
|
1
|
1683
|
|
POST
|
The full error is: Traceback (most recent call last): File "D:\scheduled_tasks\ProjectFolder\WCO_dataPull_editTest.py", line 41, in CreateOperatorDatabase with arcpy.da.Editor(os.path.dirname(gisweb_wco), multiuser_mode=True): TypeError: function takes at most 1 argument (2 given) The full Traceback for the original error is: Traceback (most recent call last): File "D:\scheduled_tasks\WildlifeControlOperators\WCO_dataPull.py", line 111, in CreateOperatorDatabase arcpy.management.DeleteFeatures(gisweb_wco) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4241, in DeleteFeatures raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4238, in DeleteFeatures retval = convertArcObjectToPythonObject(gp.DeleteFeatures_management(*gp_fixargs((in_features,), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 160250: Objects in this class cannot be updated outside an edit session Failed to execute (DeleteFeatures).
... View more
09-29-2023
07:23 AM
|
0
|
0
|
1712
|
|
POST
|
I am trying to Delete, then Append data to a feature class in a versioned Enterprise GDB using a Python script (which is scheduled). I have run this same script before without issue and have other scripts running to update datasets on the same GDB that run without issue as well. I noticed that one of my scripts failed with the Error: ERROR 160250: Objects in this class cannot be updated outside an edit session Failed to execute (DeleteFeatures). Not sure if the is due to a setting that was changed on the feature class (which I do not administer and have no control over), but in response the the error, I tried to use the Editor class and start an editing session on the feature class before trying to Delete the records. Here is my code: # Environment settings and global variables print ("Setting workspace and defining global variables\n")
workFolder = r"\\server\\Scheduled_Tasks\\ProjectFolder"
logging.info("Setting workspace and defining global variables\n")
TempDB = "Temp.gdb"
TempWS = os.path.join(workFolder, TempDB)
gis_sde = '\\\\tasksFolder\\DB_connections\\gis_gdb.sde'
GISDB = os.path.join(gis_sde, "gis_gdb.Feature_dataset")
def CreateOperatorDatabase():
try:
WCO_merc = os.path.join(TempWS, "WCO_merc")
gisweb_wco = os.path.join(GISDB, "gis_gdb.point_featureClass")
with arcpy.da.Editor(os.path.dirname(gisweb_wco), multiuser_mode=True):
arcpy.management.DeleteFeatures(gisweb_wco)
arcpy.management.Append(WCO_merc, gisweb_wco, "NO_TEST","","")
except: print("Failed to process trapper data\n") logging.exception("Failed
to process trapper data\n") When I run the code I get the error "TypeError: function takes at most 1 argument (2 given)" Now I am confused because in the documentation it clearly states that the Editor class takes one required argument and one optional argument (and both are needed if editing in a versioned Enterprise GDB). Documentation: https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.html Editor (workspace, {multiuser_mode}) Parameter Explanation Data Type workspace Path to the workspace to edit. The editor can edit only one workspace at a time. String multiuser_mode When edits will be performed on versioned data, set this to True; otherwise, set it to False. Only use with enterprise geodatabases. (The default value is True) Boolean Example from doc: new_students = 'C:/projects/Portland/Portland.sde/ptld.main.students_new2022'
students = 'C:/projects/Portland/Portland.sde/ptld.main.students'
# Start an edit session. Provide the workspace being acted on
# and with sde specify if data is edited in multiuser_mode.
with arcpy.da.Editor(os.path.dirname(students), multiuser_mode=True):
# If all 3 edit operations run successfully without error
# upon exiting this code block the edits will be applied to the data
arcpy.management.CalculateField(new_students , 'arrived', '2022')
arcpy.management.Append(new_students, students)
arcpy.management.CalculateField(students, "active", True) Can any one tell me what I am missing?
... View more
09-29-2023
06:59 AM
|
0
|
7
|
1764
|
|
POST
|
Yes, I got it and I did go to the docs but the message was a little pre-mature and could be a little more specific. I thought something was wrong with the web map. 🙂 Thanks!!
... View more
09-15-2023
01:07 PM
|
0
|
0
|
1956
|
|
POST
|
I am using EXB version 1.12 and am trying to add the Near Me widget to a new application. After adding the widget and selecting the map in the widget settings, I get a message that appears in the widget: I have no idea what I am supposed to be configuring in the web map because there is no documentation that I can find on what exactly needs to be configured. I do NOT want to do any analysis, just want to find features based on a location (like the WAB version). The map only contains a single point layer hosted at ArcGIS REST services. I looked at the web map settings on the details page and don't see anything that needs to be configured. Can someone please let me know what I am missing? Thank you! I figured it out, but I will leave this post up in case someone else has the same issue. The message is just misleading. Apparently it is just a generic message letting you know that you haven't configured anything in the Near Me Map Settings. Once I clicked the Add Analysis button and set the analysis type and distance/etc the message was gone.
... View more
09-15-2023
12:48 PM
|
0
|
3
|
1971
|
|
POST
|
I need to publish data to Enterprise Portal with a relationship class, but am having no success. I have two layers, a polygon layer and a table. The table contains information about the polygon features and both the polygon layer and the table are registered to an Enterprise GDB which is branch versioned (as per Esri documentation). The relationship class is simple, one to one with a primary and foreign key (the same field: PropID). Also, I have created a data store with the Enterprise GDB set as the Publisher connection and the server connection which Validates successfully. When publishing, I am referencing the registered data as a feature service and leave everything else to default. Analyzing returns no errors or warnings. The problem is that after I publish the Web Layer to our Portal and view the layer description from my content I can see the problem, but I don't know why it is happening or how to fix it. Clicking the Data tab opens the origin layer table, but when I click the 'show' link to the right, the is what I am seeing: Somehow, during publishing the wrong field is being used to establish the relationship (CustID). Does any one have any idea how this is happening because I am out of ideas. ArcGIS Server version where source data is located: 10.8.2 ArcGIS Enterprise Portal version: 11 ArcPro version: 3.0.2
... View more
06-27-2023
11:01 AM
|
1
|
1
|
1435
|
|
POST
|
Yes, I think you are correct. The documentation was a little vague and I interpreted to mean that as long as the gdb was registered I was good to go. Still don't know why I wasn't able to register the gdb, I have done if before without issue unless it was because I had an attribute rule being applied. Unfortunately the error wasn't much help.
... View more
04-28-2023
05:31 AM
|
0
|
0
|
1093
|
|
POST
|
I am trying to publish a feature service with a polygon layer using ArcPro and am getting an error when analyzing: 00134 Layer's data source is not supported (Feature Service). The map document contains a single polygon feature class that I want to publish as a feature service. According to the Esri documentation this error occurs when sharing a Map image layer. I have been using ArcPro for about 7 years and I have no idea what this is. I am guessing that the real reason for the error is because the geodatabase isn't registered. When attempting to register the gdb, however, the Manage Registered Data Stores' pane only displays: "Date stores cannot be registered to ArcGIS Online". Not sure what I am missing, It's been a while since I published a feature service, but I don't remember it being this difficult.
... View more
04-24-2023
06:32 AM
|
0
|
2
|
1152
|
|
POST
|
After checking the config.json file, I found the issue. I found 2 instances where the query widget icon svg had a localhost address. Not sure why that happened, but I copied and pasted the correct paths from the console to the config and all is good.
... View more
01-30-2023
08:34 AM
|
1
|
0
|
1097
|
|
POST
|
The svg images for the widget icons sometimes won't show up after the app is exported to and deployed on a local server. I am having an issue with one icon in particular, the default Query widget icon will sometimes not load on both desktop and mobile layout once the app is deployed. Screenshot of icons in the EXB GUI in mobile layout: Screenshot taken from mobile phone: Would like to know if any one else has had the same issue, is this a possible bug, and is there a quick fix?
... View more
01-30-2023
07:11 AM
|
0
|
1
|
1106
|
|
POST
|
I created an Experience Builder Developer application that will be hosted on a secure server with restricted access. Most of the staff who will be using the app do not have an ArcGIS online account so using the users login credentials isn't an option. I looked at application login as a possibility, but from my understanding of the documentation it doesn't appear that this supports web maps and that it also requires a proxy file. Integrated Windows Authentication looks promising, but from the docs it's hard to tell if we need to have portal installed on our server or if it works with ArcGIS online portal. Also, there doesn't appear to be a way to bring a map service directly into an EXB app and view the data on a basemap like in WAB developer. This would solve my problem and avoid the Web map access issue, so if I am missing something please let me know.
... View more
01-13-2023
11:07 AM
|
0
|
0
|
753
|
|
POST
|
I wanted to post more info about this issue because I have isolated the cause. This seems to be isolated to the Query widget and occurs whenever there is a map action that filters a map layer and the action applies to the Framework. For some reason, the Query widget is not able to access the filtered records in order to populate the dropdown menu, but I have found a work-around! As an example, If I wish to create a Filter action for Extent changes, in the Map Action pane I Select 'Add a trigger'/Extent changes/Framework/Filter data records. After selecting the data, in the dropdown I select 'Create a view'. Once the view is created I make sure it is selected in the dropdown under the Action data layer. Now the map will filter the view and not the map layer. Since I only wanted to filter the Attribute table, I can now go to the table Content pane, open the table Data configuration and select the view of the data as opposed to the 'default' setting. Now, only the table will be filtered and the Query widget isn't affected since it is looking at the map layer and not a view and the menu will populate as expected. I hope this helps for anyone having the same issue.
... View more
01-05-2023
06:40 AM
|
3
|
0
|
2048
|
|
POST
|
After further investigation the Arcade expressions for the popups work as expected in EXB version 1.10 so it looks like I will be updating to the newer version.
... View more
12-22-2022
12:44 PM
|
0
|
0
|
1322
|
|
POST
|
I am using Experience Builder Developer version 1.9 and I have configured a popup in the web map that uses an attribute expression for two of the fields: Here is the expression for the Years stocked field. My field configuration for the popup: And the web map popup works fine: As you can see everything works as expected in the web map. When I open the popup in Experience Builder, however, the content from each of the expressions is missing: I knew that expressions containing html wouldn't work on EXB, but i was under the impression the an attribute expression was allowed as long as it was created from the field expression tool which doesn't allow html. It doesn't seem very helpful if you can create great popup content using an Arcade expression in the web map, but it doesn't transfer to the application. Am I missing something?
... View more
12-22-2022
10:51 AM
|
0
|
1
|
1349
|
| Title | Kudos | Posted |
|---|---|---|
| 8 | 10-28-2025 10:15 AM | |
| 2 | 10-14-2025 06:36 AM | |
| 1 | 09-16-2022 09:31 AM | |
| 1 | 06-13-2024 05:45 AM | |
| 1 | 06-26-2025 06:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-06-2025
04:20 AM
|