|
POST
|
All good ideas, but still no success. p1.filter.list = ["a", "b", "don\'s c", "d"] There really should be no reason to have to escape a quote in a literal (assuming you use a double quotes to surround it). In my case I'm not even using literals - I pull the values out of the database. My guess is that at some point they (ESRI) flatten the list to a single string which is where they into trouble - I have no idea why they would want to do something like that but it would be nice to hear from the ESRI team on this.
... View more
01-27-2021
06:00 PM
|
0
|
0
|
5623
|
|
POST
|
That's a great idea - unfortunately it didn't seem to work quite right for me. Here is what I get: I think I got the apostrophes right - and I even tried copying directly from your post..... p1.filter.list = ["a", "b", "don''s c", "d"]
... View more
01-27-2021
04:52 PM
|
0
|
1
|
5637
|
|
POST
|
I have a multivalue parameter in my python tool and the values may include characters such as quotes. When I select such a value from the list (and the one after it) and click run I get an error below. Since this all happens even before any of my toolbox functions are called (in any case they are empty) there must be some trick in specifying the list of value in the first place to get this to work. Here is my toolbox source that shows defining the parameter. These are the only modifications I made to the default tool code. def getParameterInfo(self):
"""Define parameter definitions"""
p1 = arcpy.Parameter(
displayName='Pick list',
name='p1',
datatype='GPString',
parameterType='Optional',
direction="Input",
multiValue=True)
p1.filter.type = "ValueList"
p1.filter.list = ["a", "b", "don's c", "d"]
params = [p1]
return params In reality the list is populated from values looked up in a database so I don't have any control whether they contain quotes and it isn't an option to not include strings with quotes. I'm running on the python that comes with ArcPro 2.6.1 - Windows.
... View more
01-27-2021
04:14 PM
|
0
|
9
|
5646
|
|
POST
|
I was indeed able to create a new SOI once I installed the ArcGIS Enterprise SDK and selected the proper project template. I installed it on my ArcGIS server OK and enabled it on my REST service (published from ArcGIS Pro) but the REST service failed with a "ClassFactory cannot supply requested class" error. Since the SOI I'm testing is the default (no customizations) I'm assuming the problem is an outdated .NET framework on the ArcGIS server. I don't do the server installs but I'd like to understand what I need to request from the group that does. Can I update the .NET framework and keep the server at 10.6 or do I have to update the entire server? Thanks!
... View more
10-25-2020
04:48 PM
|
3
|
2
|
1537
|
|
POST
|
Thanks Hanhan - this seems to explain our problem. I found an example that illustrates selecting the proper platform. I'll give it a try in the next couple of days.
... View more
10-23-2020
02:57 PM
|
3
|
0
|
5123
|
|
POST
|
Right - I just tried this on the latest ArcGIS PRO (2.6.1) and I still can not get the option to enable the SOI from a published service. The only option that I can see for me is to stick with doing it in Python 2.7 I dug into the documentation a bit more and my guess is that my problem is that I'm trying to publish "web feature layers" to an ArcGIS server but only "map image layers" are supported (from ArcGIS Pro). To publish "web feature layers" it looks like I need a FeatureSharingDraft object and there is only one way to get that - Map.getWebLayerSharingDraft() where you specify the service type (FEATURE, TILE, or MAP_IMAGE). However the documentation states: When I look at the CreateSharingDraft documentation there is no way to specify the service type - it says it only returns a MapServiceDraft - no way to get a FeatureSharingDraft.
... View more
10-18-2020
10:47 AM
|
2
|
1
|
3941
|
|
POST
|
It appeared that maybe this was fixed in ArcGIS Pro 2.6.0 (BUG-000116650) but further testing shows that it the generated path is still incorrect. It looks like ESRI may have tried to fix it because the generated path is different, but it is still incorrect. Here is the path as coded in the toolbox .pyt file that is included in the project IMPORT_DIR = r'C:\Git_Repository\ROW_as_habitat\row\consolidation' Here is how it shows up after consolidation g_ESRI_variable_1 = os.path.join(arcpy.env.scriptWorkspace,'consolidation') Which resolves to this directory once the project is open via the AGOL portal C:\Users\DMORRI~1\AppData\Local\Temp\ArcGISProTemp16060\consolidation This is where it actually exists in the downloaded package C:\Users\dmorrison\Documents\ArcGIS\Packages\TEST_PROJECT_541a08\p20\consolidation
... View more
10-05-2020
04:52 PM
|
0
|
0
|
1498
|
|
POST
|
Excellent idea. I was already using similar code to zip the file so it was an easy modification to filter out the .lock files. I was expecting have have problems deleting the file geodatabase after the zip but that seems to work OK even with the .lock file.
... View more
10-05-2020
02:54 PM
|
0
|
0
|
1375
|
|
POST
|
Hi Cooper - do you know if there is a way to circumvent this problem? I have a number of critical scripts that are broken due this bug. I'm willing to go in and add some code if necessary. It looks to me like the only way to get rid of that lock file is to end the python script's process, but to do that in the middle of the script is really not feasible.
... View more
10-03-2020
11:44 AM
|
0
|
6
|
4507
|
|
POST
|
I just upgraded to 2.6 and my applications are broken for the same reason. I really need a fix or a circumvention immediately - please.
... View more
09-25-2020
12:30 PM
|
0
|
1
|
2415
|
|
POST
|
It appears that it "fails" if there is a table in the workspace with the same name as the name of the table view being created (out_view). I have a table called Organization in my enterprise database (but not DummyTitle or Org). I also have a table called Program and sure enough when I created a table view with that name, the definition query came out blank. So I guess that explains it - I really think it should throw an error in this case it the definition query can not be preserved.
... View more
09-21-2020
09:56 PM
|
0
|
0
|
951
|
|
POST
|
In my python code that generates mxd files, I changed the name of one of my table views from 'Organizations' to 'Organization' and later discovered that the table view's definition query became blank with that change. To make it even stranger, this only happens if arcpy.env.workspace is set to my enterprise database (None and a file geodatabase work OK). I expect I'll have to open a problem with ESRI, but thought I'd log it here in case anybody else stumbles on it. This is a very severe error for me since the definition query filters sensitive data out of the view - at least when it is working as designed. An obvious workaround is to name it something other than "Organization" but it does shake my confidence that I can trust that the sensitive data will always get filtered out appropriately. Here is the test code that reproduces the problem import os
import arcpy
DB_PATH = r'C:/Users/dmorri28/Documents/ArcGIS/Projects/MyProject/CC-SQL2k16-ERC-SDE.sde'
DB_TABLE = os.path.join(DB_PATH, 'ROW_Habitat.SDE.Program')
TITLES = ['DummyTitle', 'Organization', 'Org']
WORKSPACES = [None, DB_PATH, arcpy.env.scratchWorkspace]
def run_test (workspace, title):
print ('***********************************')
print ('Workspace: %s' % workspace)
print ('Title: %s'% title)
arcpy.env.workspace = workspace
arcpy.MakeTableView_management(DB_TABLE, title, "Org_ID = 'FM'")
table_view = arcpy.mapping.TableView(title)
print ("Table view query: %s" % (str(table_view.definitionQuery)))
arcpy.Delete_management(title, 'TableView')
if __name__ == '__main__':
for workspace in WORKSPACES:
for title in TITLES:
run_test(workspace, title) Here is the output - notice how on the fifth test the query is empty. ***********************************
Workspace: None
Title: DummyTitle
Table view query: Org_ID = 'FM'
***********************************
Workspace: None
Title: Organization
Table view query: Org_ID = 'FM'
***********************************
Workspace: None
Title: Org
Table view query: Org_ID = 'FM'
***********************************
Workspace: C:/Users/dmorri28/Documents/ArcGIS/Projects/MyProject/CC-SQL2k16-ERC-SDE.sde
Title: DummyTitle
Table view query: Org_ID = 'FM'
***********************************
Workspace: C:/Users/dmorri28/Documents/ArcGIS/Projects/MyProject/CC-SQL2k16-ERC-SDE.sde
Title: Organization
Table view query:
***********************************
Workspace: C:/Users/dmorri28/Documents/ArcGIS/Projects/MyProject/CC-SQL2k16-ERC-SDE.sde
Title: Org
Table view query: Org_ID = 'FM'
***********************************
Workspace: None
Title: DummyTitle
Table view query: Org_ID = 'FM'
***********************************
Workspace: None
Title: Organization
Table view query: Org_ID = 'FM'
***********************************
Workspace: None
Title: Org
Table view query: Org_ID = 'FM' I was able to reproduce this on two different systems. I'm running this on Python 2.7. I'm also using ArcMap 10.6.1.
... View more
09-21-2020
09:45 PM
|
0
|
1
|
975
|
|
POST
|
I think you are correct. I'm not seeing any problem - at least with the PDFs that I'm generating.
... View more
09-15-2020
08:03 AM
|
0
|
0
|
4597
|
|
POST
|
Jeremy Wright , did you ever get an answer to this? I'm about to recommend that we use the ArcGIS Pro reporting function for one of our projects but this might be a deal breaker since we will be generating a large number of documents. I'd much rather find out now than after we have invested a lot of time on it. Thanks
... View more
09-09-2020
03:36 PM
|
0
|
3
|
4596
|
|
POST
|
The purpose of the WAB widget (hosted on ArcGIS Online) is to perform data cleaning and validation on our geospatial database. So the Geoprocessing widget simply calls the REST service (on our on-premises ArcGIS server) that I created based on code I wrote in a python toolbox. The python code inspects and cleans the various database tables. It logs messages via arcpy.AddMessage. When I ran the service synchronously those messages never got displayed by the widget. But now that I've switched to asynchronous, they do - which I really like. Once the python code has completed its job, it sets the output message as shown above where I assign the string to "parameters[2]". The widget at that point wipes out the previous messages and displays just the output parameter: So it is now working very well - although I don't understand totally why. BTW - I had a lot of problems republishing the REST service. For instance: In ArcPro I could publish only once without restarting. Subsequent attempts did not work or throw an error message It appeared some aspects of the REST specification where cached and I could not change them with a republish. For instance, changing a parameter name or the type (as defined in the toolbox code). Even if I deleted the existing REST service before the republish, the old values persisted. I had to give my REST service a new name for the proper values to be set. Luckily the WAB widget is the only consumer of the service so I'm not worried about breaking anybody else. When I switched my REST service from synchronous to asynchronous, the WAB widget did not detect that. I had to delete the widget and create a new one. Thanks again for putting me on the track of using the asynchronous service - it really does work better than what I was doing before.
... View more
09-08-2020
10:22 AM
|
0
|
0
|
3200
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-18-2025 03:42 PM | |
| 1 | 11-19-2025 02:36 PM | |
| 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 |
11-28-2025
04:52 AM
|