<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: fail to update AGOL Feature Error 400 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/fail-to-update-agol-feature-error-400/m-p/1124408#M63204</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'll answer my own question... such a simple mistake...&lt;/P&gt;&lt;P&gt;you need to specify the out fields...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bobFS_Area_Filter = bobFS_Area.query(where = "objectid = 3",out_fields="objectid, SurveyStatus")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2021 16:22:35 GMT</pubDate>
    <dc:creator>StuartMoore</dc:creator>
    <dc:date>2021-12-09T16:22:35Z</dc:date>
    <item>
      <title>fail to update AGOL Feature Error 400</title>
      <link>https://community.esri.com/t5/python-questions/fail-to-update-agol-feature-error-400/m-p/1124400#M63200</link>
      <description>&lt;P&gt;i'm trying to read a polygon feature in AGOL do some things and then set a attribute to complete but for some reason i get an error when trying apply the updates, ive re-used some code that has worked on a different FS but i'm stumped&lt;/P&gt;&lt;P&gt;can anyone see what i have missed....&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
import os
gis = GIS("home")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;bobFS = gis.content.get("5xxxxxxxx9")
bobFS_Area = bobFS.layers[0]
bobFS_Area_Filter = bobFS_Area.query(where = "objectid = 3")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;for bob in bobFS_Area_Filter:
    print (bob.attributes['OBJECTID'])
    print(bob.attributes['SurveyStatus'])
    bob.attributes['SurveyStatus'] = 'Comp'
    bobFS_Area.edit_features( updates=[bob])
    print("Done")&lt;/LI-CODE&gt;&lt;P&gt;results&lt;/P&gt;&lt;LI-CODE lang="python"&gt;3
Met
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
In  [78]:
Line 5:     bobFS_Area.edit_features( updates=[bob])

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\layer.py, in edit_features:
Line 2827:  return self._con.post_multipart(path=edit_url, postdata=params)

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in post_multipart:
Line 868:   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, in _handle_response:
Line 625:   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, in _handle_json_error:
Line 648:   raise Exception(errormessage)

Exception: 
Field Street_hyper has invalid html content.
(Error Code: 400)
---------------------------------------------------------------------------&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Dec 2021 16:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fail-to-update-agol-feature-error-400/m-p/1124400#M63200</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2021-12-09T16:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: fail to update AGOL Feature Error 400</title>
      <link>https://community.esri.com/t5/python-questions/fail-to-update-agol-feature-error-400/m-p/1124408#M63204</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'll answer my own question... such a simple mistake...&lt;/P&gt;&lt;P&gt;you need to specify the out fields...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bobFS_Area_Filter = bobFS_Area.query(where = "objectid = 3",out_fields="objectid, SurveyStatus")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 16:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fail-to-update-agol-feature-error-400/m-p/1124408#M63204</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2021-12-09T16:22:35Z</dc:date>
    </item>
  </channel>
</rss>

