<?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 ValueError: Circular reference detected in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1288961#M8722</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this error :&amp;nbsp;ValueError: Circular reference detected when I run this code. Does someone have an idea how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from arcgis import geometry #use geometry module to project Long,Lat to X and Y&lt;BR /&gt;from copy import deepcopy&lt;/P&gt;&lt;P&gt;for Project in overlap_rows['Project']:&lt;BR /&gt;# get the feature to be updated&lt;BR /&gt;original_feature = [f for f in all_features if f.attributes['Project'] == Project][0]&lt;BR /&gt;feature_to_be_updated = deepcopy(original_feature)&lt;BR /&gt;&lt;BR /&gt;# get the matching row from csv&lt;BR /&gt;matching_row = PB1_df[PB1_df['Project'] == Project].iloc[0]&lt;BR /&gt;&lt;BR /&gt;#get geometries in the destination coordinate system&lt;BR /&gt;#input_geometry = {'y':float(matching_row['latitude']),&lt;BR /&gt;#'x':float(matching_row['longitude'])}&lt;BR /&gt;#output_geometry = geometry.project(geometries = [input_geometry],&lt;BR /&gt;# in_sr = 4326,&lt;BR /&gt;# out_sr = cities_fset.spatial_reference['latestWkid'],&lt;BR /&gt;# gis = gis)&lt;BR /&gt;&lt;BR /&gt;# assign the updated values&lt;BR /&gt;#feature_to_be_updated.attributes['FID'] = int(matching_row['FID'])&lt;BR /&gt;#feature_to_be_updated.attributes['Begindatum'] = (matching_row['Begindatum'])&lt;BR /&gt;#feature_to_be_updated.attributes['Einddatum'] = (matching_row['Einddatum'])&lt;BR /&gt;feature_to_be_updated.attributes['Duur'] = int(matching_row['Duur'])&lt;BR /&gt;feature_to_be_updated.attributes['Status'] = str(matching_row['Status'])&lt;BR /&gt;#feature_to_be_updated.attributes['Taaknaam'] = str(matching_row['Taaknaam'])&lt;BR /&gt;#feature_to_be_updated.attributes['Werkzaamheden'] = str(matching_row['Werkzaamheden'])&lt;BR /&gt;#feature_to_be_updated.attributes['Latitude'] = (matching_row['Latitude'])&lt;BR /&gt;#feature_to_be_updated.attributes['Longitude'] = (matching_row['Longitude'])&lt;BR /&gt;&lt;BR /&gt;#add this to the list of features to be updated&lt;BR /&gt;features_for_update.append(feature_to_be_updated)&lt;BR /&gt;&lt;BR /&gt;print(str(feature_to_be_updated))&lt;BR /&gt;print("========================================================================")&lt;/P&gt;&lt;P&gt;WZ1_flayer.edit_features(updates = features_for_update)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the message with error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;ValueError&lt;/SPAN&gt;                                Traceback (most recent call last)
Input &lt;SPAN class=""&gt;In [101]&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;&amp;lt;cell line: 1&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt;
&lt;SPAN class=""&gt;----&amp;gt; 1&lt;/SPAN&gt; &lt;SPAN class=""&gt;WZ1_flayer&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;edit_features&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;updates&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;features_for_update&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/site-packages/arcgis/features/layer.py:2879&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;FeatureLayer.edit_features&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, adds, updates, deletes, gdb_version, use_global_ids, rollback_on_failure, return_edit_moment, attachments, true_curve_client, session_id, use_previous_moment, datum_transformation, future)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2875&lt;/SPAN&gt;     params[&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;updates&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;] &lt;SPAN&gt;=&lt;/SPAN&gt; json&lt;SPAN&gt;.&lt;/SPAN&gt;dumps(
&lt;SPAN class=""&gt;   2876&lt;/SPAN&gt;         [&lt;SPAN&gt;dict&lt;/SPAN&gt;(f) &lt;SPAN class=""&gt;for&lt;/SPAN&gt; f &lt;SPAN class=""&gt;in&lt;/SPAN&gt; updates], default&lt;SPAN&gt;=&lt;/SPAN&gt;_date_handler
&lt;SPAN class=""&gt;   2877&lt;/SPAN&gt;     )
&lt;SPAN class=""&gt;   2878&lt;/SPAN&gt; &lt;SPAN class=""&gt;elif&lt;/SPAN&gt; &lt;SPAN&gt;isinstance&lt;/SPAN&gt;(updates[&lt;SPAN&gt;0&lt;/SPAN&gt;], Feature):
&lt;SPAN class=""&gt;-&amp;gt; 2879&lt;/SPAN&gt;     params[&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;updates&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;] &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;json&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;dumps&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2880&lt;/SPAN&gt;         &lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;as_dict&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;f&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;updates&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;_date_handler&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2881&lt;/SPAN&gt;     &lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2882&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;   2883&lt;/SPAN&gt;     &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;pass in features as list of Features, dicts or PropertyMap&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/__init__.py:234&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;dumps&lt;/SPAN&gt;&lt;SPAN class=""&gt;(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    232&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;cls&lt;/SPAN&gt; &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;None&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;    233&lt;/SPAN&gt;     &lt;SPAN&gt;cls&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; JSONEncoder
&lt;SPAN class=""&gt;--&amp;gt; 234&lt;/SPAN&gt; &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;cls&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    235&lt;/SPAN&gt;     &lt;SPAN class=""&gt;skipkeys&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;skipkeys&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;ensure_ascii&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;ensure_ascii&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    236&lt;/SPAN&gt;     &lt;SPAN class=""&gt;check_circular&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;check_circular&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;allow_nan&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;allow_nan&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;indent&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;indent&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    237&lt;/SPAN&gt;     &lt;SPAN class=""&gt;separators&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;separators&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;sort_keys&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;sort_keys&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    238&lt;/SPAN&gt;     &lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;kw&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;encode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;obj&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/encoder.py:199&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;JSONEncoder.encode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, o)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    195&lt;/SPAN&gt;         &lt;SPAN class=""&gt;return&lt;/SPAN&gt; encode_basestring(o)
&lt;SPAN class=""&gt;    196&lt;/SPAN&gt; &lt;SPAN&gt;# This doesn't pass the iterator directly to ''.join() because the&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    197&lt;/SPAN&gt; &lt;SPAN&gt;# exceptions aren't as detailed.  The list call should be roughly&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    198&lt;/SPAN&gt; &lt;SPAN&gt;# equivalent to the PySequence_Fast that ''.join() would do.&lt;/SPAN&gt;
&lt;SPAN class=""&gt;--&amp;gt; 199&lt;/SPAN&gt; chunks &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;o&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;_one_shot&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    200&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;isinstance&lt;/SPAN&gt;(chunks, (&lt;SPAN&gt;list&lt;/SPAN&gt;, &lt;SPAN&gt;tuple&lt;/SPAN&gt;)):
&lt;SPAN class=""&gt;    201&lt;/SPAN&gt;     chunks &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;list&lt;/SPAN&gt;(chunks)

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/encoder.py:257&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;JSONEncoder.iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, o, _one_shot)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    252&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;    253&lt;/SPAN&gt;     _iterencode &lt;SPAN&gt;=&lt;/SPAN&gt; _make_iterencode(
&lt;SPAN class=""&gt;    254&lt;/SPAN&gt;         markers, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;default, _encoder, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;indent, floatstr,
&lt;SPAN class=""&gt;    255&lt;/SPAN&gt;         &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;key_separator, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;item_separator, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;sort_keys,
&lt;SPAN class=""&gt;    256&lt;/SPAN&gt;         &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;skipkeys, _one_shot)
&lt;SPAN class=""&gt;--&amp;gt; 257&lt;/SPAN&gt; &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;_iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;o&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;ValueError&lt;/SPAN&gt;: Circular reference detected&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 14 May 2023 20:35:39 GMT</pubDate>
    <dc:creator>IB3</dc:creator>
    <dc:date>2023-05-14T20:35:39Z</dc:date>
    <item>
      <title>ValueError: Circular reference detected</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1288961#M8722</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this error :&amp;nbsp;ValueError: Circular reference detected when I run this code. Does someone have an idea how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from arcgis import geometry #use geometry module to project Long,Lat to X and Y&lt;BR /&gt;from copy import deepcopy&lt;/P&gt;&lt;P&gt;for Project in overlap_rows['Project']:&lt;BR /&gt;# get the feature to be updated&lt;BR /&gt;original_feature = [f for f in all_features if f.attributes['Project'] == Project][0]&lt;BR /&gt;feature_to_be_updated = deepcopy(original_feature)&lt;BR /&gt;&lt;BR /&gt;# get the matching row from csv&lt;BR /&gt;matching_row = PB1_df[PB1_df['Project'] == Project].iloc[0]&lt;BR /&gt;&lt;BR /&gt;#get geometries in the destination coordinate system&lt;BR /&gt;#input_geometry = {'y':float(matching_row['latitude']),&lt;BR /&gt;#'x':float(matching_row['longitude'])}&lt;BR /&gt;#output_geometry = geometry.project(geometries = [input_geometry],&lt;BR /&gt;# in_sr = 4326,&lt;BR /&gt;# out_sr = cities_fset.spatial_reference['latestWkid'],&lt;BR /&gt;# gis = gis)&lt;BR /&gt;&lt;BR /&gt;# assign the updated values&lt;BR /&gt;#feature_to_be_updated.attributes['FID'] = int(matching_row['FID'])&lt;BR /&gt;#feature_to_be_updated.attributes['Begindatum'] = (matching_row['Begindatum'])&lt;BR /&gt;#feature_to_be_updated.attributes['Einddatum'] = (matching_row['Einddatum'])&lt;BR /&gt;feature_to_be_updated.attributes['Duur'] = int(matching_row['Duur'])&lt;BR /&gt;feature_to_be_updated.attributes['Status'] = str(matching_row['Status'])&lt;BR /&gt;#feature_to_be_updated.attributes['Taaknaam'] = str(matching_row['Taaknaam'])&lt;BR /&gt;#feature_to_be_updated.attributes['Werkzaamheden'] = str(matching_row['Werkzaamheden'])&lt;BR /&gt;#feature_to_be_updated.attributes['Latitude'] = (matching_row['Latitude'])&lt;BR /&gt;#feature_to_be_updated.attributes['Longitude'] = (matching_row['Longitude'])&lt;BR /&gt;&lt;BR /&gt;#add this to the list of features to be updated&lt;BR /&gt;features_for_update.append(feature_to_be_updated)&lt;BR /&gt;&lt;BR /&gt;print(str(feature_to_be_updated))&lt;BR /&gt;print("========================================================================")&lt;/P&gt;&lt;P&gt;WZ1_flayer.edit_features(updates = features_for_update)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the message with error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;ValueError&lt;/SPAN&gt;                                Traceback (most recent call last)
Input &lt;SPAN class=""&gt;In [101]&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;&amp;lt;cell line: 1&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt;
&lt;SPAN class=""&gt;----&amp;gt; 1&lt;/SPAN&gt; &lt;SPAN class=""&gt;WZ1_flayer&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;edit_features&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;updates&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;features_for_update&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/site-packages/arcgis/features/layer.py:2879&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;FeatureLayer.edit_features&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, adds, updates, deletes, gdb_version, use_global_ids, rollback_on_failure, return_edit_moment, attachments, true_curve_client, session_id, use_previous_moment, datum_transformation, future)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2875&lt;/SPAN&gt;     params[&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;updates&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;] &lt;SPAN&gt;=&lt;/SPAN&gt; json&lt;SPAN&gt;.&lt;/SPAN&gt;dumps(
&lt;SPAN class=""&gt;   2876&lt;/SPAN&gt;         [&lt;SPAN&gt;dict&lt;/SPAN&gt;(f) &lt;SPAN class=""&gt;for&lt;/SPAN&gt; f &lt;SPAN class=""&gt;in&lt;/SPAN&gt; updates], default&lt;SPAN&gt;=&lt;/SPAN&gt;_date_handler
&lt;SPAN class=""&gt;   2877&lt;/SPAN&gt;     )
&lt;SPAN class=""&gt;   2878&lt;/SPAN&gt; &lt;SPAN class=""&gt;elif&lt;/SPAN&gt; &lt;SPAN&gt;isinstance&lt;/SPAN&gt;(updates[&lt;SPAN&gt;0&lt;/SPAN&gt;], Feature):
&lt;SPAN class=""&gt;-&amp;gt; 2879&lt;/SPAN&gt;     params[&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;updates&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;] &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;json&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;dumps&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2880&lt;/SPAN&gt;         &lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;as_dict&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;f&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;updates&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;_date_handler&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2881&lt;/SPAN&gt;     &lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;   2882&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;   2883&lt;/SPAN&gt;     &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;pass in features as list of Features, dicts or PropertyMap&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/__init__.py:234&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;dumps&lt;/SPAN&gt;&lt;SPAN class=""&gt;(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    232&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;cls&lt;/SPAN&gt; &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;None&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;    233&lt;/SPAN&gt;     &lt;SPAN&gt;cls&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; JSONEncoder
&lt;SPAN class=""&gt;--&amp;gt; 234&lt;/SPAN&gt; &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;cls&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    235&lt;/SPAN&gt;     &lt;SPAN class=""&gt;skipkeys&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;skipkeys&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;ensure_ascii&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;ensure_ascii&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    236&lt;/SPAN&gt;     &lt;SPAN class=""&gt;check_circular&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;check_circular&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;allow_nan&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;allow_nan&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;indent&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;indent&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    237&lt;/SPAN&gt;     &lt;SPAN class=""&gt;separators&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;separators&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;sort_keys&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;sort_keys&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    238&lt;/SPAN&gt;     &lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;kw&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;encode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;obj&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/encoder.py:199&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;JSONEncoder.encode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, o)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    195&lt;/SPAN&gt;         &lt;SPAN class=""&gt;return&lt;/SPAN&gt; encode_basestring(o)
&lt;SPAN class=""&gt;    196&lt;/SPAN&gt; &lt;SPAN&gt;# This doesn't pass the iterator directly to ''.join() because the&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    197&lt;/SPAN&gt; &lt;SPAN&gt;# exceptions aren't as detailed.  The list call should be roughly&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    198&lt;/SPAN&gt; &lt;SPAN&gt;# equivalent to the PySequence_Fast that ''.join() would do.&lt;/SPAN&gt;
&lt;SPAN class=""&gt;--&amp;gt; 199&lt;/SPAN&gt; chunks &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;o&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;_one_shot&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    200&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;isinstance&lt;/SPAN&gt;(chunks, (&lt;SPAN&gt;list&lt;/SPAN&gt;, &lt;SPAN&gt;tuple&lt;/SPAN&gt;)):
&lt;SPAN class=""&gt;    201&lt;/SPAN&gt;     chunks &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;list&lt;/SPAN&gt;(chunks)

File &lt;SPAN class=""&gt;/opt/conda/lib/python3.9/json/encoder.py:257&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;JSONEncoder.iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(self, o, _one_shot)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    252&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;:
&lt;SPAN class=""&gt;    253&lt;/SPAN&gt;     _iterencode &lt;SPAN&gt;=&lt;/SPAN&gt; _make_iterencode(
&lt;SPAN class=""&gt;    254&lt;/SPAN&gt;         markers, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;default, _encoder, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;indent, floatstr,
&lt;SPAN class=""&gt;    255&lt;/SPAN&gt;         &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;key_separator, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;item_separator, &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;sort_keys,
&lt;SPAN class=""&gt;    256&lt;/SPAN&gt;         &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;skipkeys, _one_shot)
&lt;SPAN class=""&gt;--&amp;gt; 257&lt;/SPAN&gt; &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;_iterencode&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;o&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;ValueError&lt;/SPAN&gt;: Circular reference detected&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 20:35:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1288961#M8722</guid>
      <dc:creator>IB3</dc:creator>
      <dc:date>2023-05-14T20:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Circular reference detected</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1288967#M8723</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;would help provide line numbers and proper indentation for those trying to look at the code&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 21:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1288967#M8723</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-05-14T21:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Circular reference detected</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1368077#M9496</link>
      <description>&lt;P&gt;I struck this myself recently; in my case, whitespace characters in two of the string fields were causing the issue.&lt;/P&gt;&lt;P&gt;Using the &lt;EM&gt;fillna&lt;/EM&gt; and/or &lt;EM&gt;str.replace&lt;/EM&gt; methods before updating any of the&amp;nbsp;&lt;SPAN&gt;feature_to_be_updated.attributes could help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:05:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/valueerror-circular-reference-detected/m-p/1368077#M9496</guid>
      <dc:creator>sth_eagle</dc:creator>
      <dc:date>2024-01-09T20:05:04Z</dc:date>
    </item>
  </channel>
</rss>

