Closed jamesshickey closed 6 years ago
@jamesshickey Can you send across the exception? The issue with Fail(e) has been addressed. Thanks for letting us know.
Hi, Thanks for the response. Here is the error I get in ArcGIS Pro: Start Time: Wednesday, April 25, 2018 1:47:23 PM Running script AddGNSSFieldsPythonAPI... Parsing Arguments.. Done parsing arguments.. Signed into organization.. Failed script Add GNSS Metadata Fields (Pro) - Hosted Feature Service... Item does not exist or is inaccessible. Traceback (most recent call last): File "C:\Users\user_name\Documents\ArcGIS\Projects\MyProject2\CollectorUtils\add_update_gnss_fields_python_api.py", line 57, in searchItems_addGNSSMetadataFields featureLayerCollection = FeatureLayerCollection.fromitem(featureLayerItem) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis__init__.py", line 5433, in fromitem if not item.type.lower().endswith('service'): AttributeError: 'NoneType' object has no attribute 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user_name\Documents\ArcGIS\Projects\MyProject2\CollectorUtils\add_update_gnss_fields_python_api.py", line 434, in
Thanks, James
Here is the error after updating to the latest version of the scripts: Start Time: Wednesday, April 25, 2018 1:54:27 PM Running script AddGNSSFieldsPythonAPI... Parsing Arguments.. Done parsing arguments.. Signed into organization.. 'NoneType' object has no attribute 'type' Completed script Add GNSS Metadata Fields (Pro) - Hosted Feature Service... Failed to execute (AddGNSSFieldsPythonAPI). Failed at Wednesday, April 25, 2018 1:54:29 PM (Elapsed Time: 2.42 seconds)
How should the Feature Service Item Id look? I have entered both: https://servicesPlace.arcgis.com/Cdds924509asdfk239wWE/arcgis/rest/services/FolderName/FeatureServer and also tried: Cdds924509asdfk239wWE
@jamesshickey I believe the id should be the item id of the service, which can be accessed from the item details page of the service:
Yes, that is it Thank you Worked perfect once i put the right number in. :grinning: Cheers.
I ran the script "as is" and am receiving an error that says that arcpy has no attribute fail, I change the line in file:add_update_gnss_fields_python_api.py that says arcpy.Fail(e) to print(e) and the script runs but does not update the fields in my arcgis online data. Any ideas why the fields are not added? The feature service is set to editable. Thanks for this script by the way. ArcPro 2.1.2 ArcGIS Desktop 10.5.1 Python - Installed with ArcPro