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)