|
POST
|
It's hard to say what that query string parameter is doing? The results I'm seeing range from dashboards to webmaps, not just feature layers. And only 1/4 I randomly looked at was 'authoritative'. That print statement printed out 2045 orginization-wide items, which is basically every item in our AGOL account.
... View more
04-29-2021
01:18 PM
|
0
|
3
|
6054
|
|
POST
|
Thanks @jcarlson . If it's is a query string why doesn't this result in anything? auth_items = gis.content.search(
'contentstatus:org_authoritative AND contentstatus:public_authoritative')
for i in auth_items:
print(i) I ran it with OR but for some reason I only got back a handful of Items from our orginization. And only one of these was mine when I know I have at least eight 'authoritative' layers alone.
... View more
04-29-2021
12:45 PM
|
0
|
5
|
6066
|
|
POST
|
I'm looking at content_status property for 'authoritative' in the docs. I'm not sure how to use that as a parameter in a search. What I want to do is list all my 'authoritative' hosted feature layers and then download them. I didn't think it would work, but I have tried: from arcgis.gis import GIS
gis = GIS("", "", "")
my_content = gis.content.search(query="owner:" + gis.users.me.username,
item_type="Feature Layer",
content_status='authoritative',
max_items=15)
my_content
#error
TypeError: search() got an unexpected keyword argument 'content_status' cont = my_content.content_status='authoritative'
cont
#error
AttributeError: 'list' object has no attribute 'content_status' items= gis.content.search(content_status='authoritative')
#error
TypeError: search() got an unexpected keyword argument 'content_status'
... View more
04-29-2021
12:02 PM
|
0
|
10
|
6834
|
|
POST
|
I'm getting this error when trying to publish a CSV to our Enterprise Portal v. 10.8. I'm running a stand-alone script in a Pro Python environment. The script first adds the CSV to the Portal as an item, then its intention is to publish the item as a hosted feature layer. But, it's failing when trying to publish. The solution in the help doc for this error mentions different ways for making the data accessible to ArcGIS Server. From the solution: If you register the containing folder, you need to explicitly give the ArcGIS Server account permissions to read from that folder. The data is in CSV format and I have made sure the local folder where it is stored is shared with our admin account. Also, I had my colleague register the folder with the ArcGIS Server account. Am I missing something? Full Error: Traceback (most recent call last):
File "pathto\ArcGISPro\test.py", line 41, in <module>
pitem = item.publish(publish_parameters=pp)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 10332, in publish
res = self._portal.con.post(path, postdata)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 720, in post
force_bytes=kwargs.pop('force_bytes', False))
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 514, in _handle_response
self._handle_json_error(data['error'], errorcode)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 536, in _handle_json_error
raise Exception(errormessage)
Exception: Analyze Service error: Server tool execution failed : ERROR 001506: Failed to download the data for the portal item. Failed to execute (Analyze Features for Portal). Failed. Failed to execute (Analyze Features for Portal). Failed.
(Error Code: 0)
... View more
04-22-2021
11:16 AM
|
0
|
3
|
3906
|
|
POST
|
@NKneisel Am I understanding correctly that you are dealing with _ (i.e. underscores) in the field values of your table that you would like removed?
... View more
04-21-2021
12:56 PM
|
0
|
0
|
4263
|
|
POST
|
@FrédéricPRALLY Any idea how to troubleshoot that error? The only help I've found on it was this. Based off this doc, I made sure the folder (which is local) where the *.csv was saved was shared to our organization's admin user account. That didn't solve the error. Also, when referencing the publish method in the docs it gives you a link for publish parameters: https://developers.arcgis.com/rest/#/Publish_Item/02r300000080000000/ But, this just brings you to the landing page of the ArcGIS REST API. Is this a mistake?
... View more
04-21-2021
09:15 AM
|
0
|
0
|
6329
|
|
POST
|
Yes, that seems to be a pattern. I have different versions of the script above and they all seem to work on someone outside of our office's machine/environment. One of these scripts I gave to my colleague to try on his machine--we both have accounts on the same Portal and we both are using the same Pro Python API environment--he gets the same errors as me.
... View more
04-16-2021
09:16 AM
|
0
|
0
|
6366
|
|
POST
|
Hi Fred, Apologies for not answering sooner. I received an error that I've yet to see once I included your snippets. I should note I'm running this in a Conda environment. If I run it in a ArcGIS Pro environment I get the same error. Here's what I ran: import pandas as pd
from arcgis import GIS, features
from datetime import datetime as dt
import requests
now = dt.now()
dStr = now.strftime('_%m_%d_%Y')
#Connection to ArcGIS Enterprise Portal running 10.8
gisE = GIS(url='', username='', password='', verify_cert=False, trust_env=False)
#Url to data
j = r'https://idph.illinois.gov/DPHPublicInformation/api/covidVaccine/getVaccineAdministrationCurrent'
#this print statement makes sure it's valid json
print(requests.get(j).json()['VaccineAdministration'])
r = requests.get(j).json()['VaccineAdministration']
csvData = fr'C:/Users/jpilbeam/Test/Test{dStr}.csv'
#Create DataFrame from the json
df = pd.json_normalize(r)
csv_file = df.to_csv(csvData, index=False)
cm = gisE.content
#Add CSV to ArcGIS Enterprise
item = cm.add(item_properties={
'title' : 'VaccineCurrent2',
'tags' : 'test',
'type' : 'CSV'}, data=csv_file)
item_id = item.id
print(item_id)
publish_params = {
'type': 'csv',
'latitudeFieldName': 'Latitude',
'longitudeFieldName': 'Longitude',
'locationType': 'coordinates'
}
#Publish
pitem = item.publish(publish_parameters=publish_params) ##I removed the print statement verifying the JSON is valid because it's too lengthy...
8d7744baf55f4c4287486dd830e42280 ##<--print output of item_id
Traceback (most recent call last):
File "\\pathtopythonfile\test.py", line 48, in <module>
pitem = item.publish(publish_parameters=publish_params)
File "C:\Users\jpilbeam\Miniconda3\envs\env1\lib\site-packages\arcgis\gis\__init__.py", line 10332, in publish
res = self._portal.con.post(path, postdata)
File "C:\Users\jpilbeam\Miniconda3\envs\env1\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 720, in post
force_bytes=kwargs.pop('force_bytes', False))
File "C:\Users\jpilbeam\Miniconda3\envs\env1\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 514, in _handle_response
self._handle_json_error(data['error'], errorcode)
File "C:\Users\jpilbeam\Miniconda3\envs\env1\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 536, in _handle_json_error
raise Exception(errormessage)
Exception: Analyze Service error: Server tool execution failed : ERROR 001506: Failed to download the data for the portal item. Failed to execute (Analyze Features for Portal). Failed. Failed to execute (Analyze Features for Portal). Failed.
(Error Code: 0) EDIT: The box is checked that allows data to be copied to the Portal when publishing.
... View more
04-14-2021
08:11 AM
|
0
|
2
|
6400
|
|
POST
|
I could've accepted any of the replies since I don't really know what was causing the problem? But, I went with that one because I assumed it has something to do with that service being open in a browser that I had open at the time? Yes, it could have just needed a reset too.
... View more
04-09-2021
12:51 PM
|
0
|
0
|
1236
|
|
POST
|
My mistake. The feature layer I was calling in the javascript above was a View. So, I had to check the box for the logo field in the Define Fields window of the View, which is left unchecked by default when you add a field ( in this case I added the logo field) after the View was already created. View --> Visualization Tab--> Set View Definition --> Define Fields
... View more
04-09-2021
10:41 AM
|
1
|
0
|
1541
|
|
POST
|
Using the below code I'm not able to put an image in my pop up, which is stored as a URL in the logo field of an attribute table of a hosted feature layer. I thought putting the name of the field in the curly brackets would enable you to have that field value ( in this case a URL to an image) show up in the pop-up. //***popups***
//popup template for table
var template = {
//autocasts the new template
title: "<img src={logo} height='60' width='60'><font size='2.75px'><b>{USER_Name}</b>",
content: [
{
//set content elements in the order to display
type: "fields",
fieldInfos: [
{
fieldName: "USER_Addre",
label: "Address",
visible: true
},
{
more fields, etc...
}
]
}
]
};
// Recycle Layer
var recycleLayer = new FeatureLayer({
portalItem: {
// autocasts as new PortalItem()
id: "b5665da3feab4b6091914cbfe4ab028f"
},
popupTemplate: template,
outFields: ["*"],
visible: false
}); Here's an screenshot of the popup currently. There is a white space to the left of the title where the logo should be, but the logo isn't there. Am I missing something in the javascript? Here's a mock-up of how I want it.
... View more
04-09-2021
09:42 AM
|
0
|
1
|
1588
|
|
POST
|
@DanPatterson I restarted (not because of this but a Windows sign-in issue) and now the field calculator is working. I wish I can say what the root of the problem was? All that I can say is that this hosted feature layer is not open in any browser, just Pro where I'm editing it.
... View more
04-09-2021
09:07 AM
|
0
|
2
|
1248
|
|
POST
|
@JoeBorgione @JayantaPoddar Well, I'm working on a hosted feature layer in Pro. So, yes, it's a published layer on AGOL. I'm signed in to my account in Pro and have added the hosted layer to the map via the Portal in the Catalog. EDIT: I've since closed the browser which called the hosted layer then ran the field calculator again. No difference.
... View more
04-08-2021
02:17 PM
|
0
|
2
|
4602
|
|
POST
|
@JayantaPoddar What's an example of an "undesired selected feature"?
... View more
04-08-2021
02:12 PM
|
0
|
1
|
4609
|
|
POST
|
@JoeBorgione It didn't hurt anything, but also didn't help. Strange. It's such a simple thing that I've always been able to do. I've also tried the same expression on a different table that has a text field with the length set to 256, which is still more than enough. It would not work either.
... View more
04-08-2021
02:09 PM
|
1
|
0
|
4614
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-25-2026 12:25 PM | |
| 1 | 05-04-2026 08:45 AM | |
| 1 | 04-20-2026 01:20 PM | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|