Describe the bug
When type "arcgis.geometry._types.Point" is passed to geometry parameter for assignment.add(), I am getting "TypeError: Object of type FeatureSet is not JSON serializable error". The error is same even if I pass in dictionary type. The issue did't exist in version 2.1.04.
To Reproduce
Attached Screenshot
error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[33], [line 1](vscode-notebook-cell:?execution_count=33&line=1)
----> [1](vscode-notebook-cell:?execution_count=33&line=1) workforce_project.assignments.add(
[2](vscode-notebook-cell:?execution_count=33&line=2) geometry= centroid_1,
[3](vscode-notebook-cell:?execution_count=33&line=3) location = "Location",
[4](vscode-notebook-cell:?execution_count=33&line=4) assignment_type = 'Inspection',
[5](vscode-notebook-cell:?execution_count=33&line=5) status='unassigned'
[6](vscode-notebook-cell:?execution_count=33&line=6) )
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\apps\workforce\managers.py:174](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:174), in AssignmentManager.add(self, feature, geometry, assignment_type, assigned_date, assignment_read, completed_date, declined_comment, declined_date, description, dispatcher, due_date, in_progress_date, location, notes, paused_date, priority, status, work_order_id, worker)
[85](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:85) def add(
[86](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:86) self,
[87](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:87) feature=None,
(...)
[105](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:105) worker=None,
[106](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:106) ):
[107](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:107) """
[108](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:108) Creates and adds a new assignment to the project
[109](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:109)
(...)
[172](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:172) :return: :class:`~arcgis.apps.workforce.Assignment`
[173](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:173) """
--> [174](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:174) return add_assignment(
[175](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:175) self.project,
[176](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:176) feature,
[177](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:177) geometry,
[178](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:178) assignment_type,
[179](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:179) assigned_date,
[180](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:180) assignment_read,
[181](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:181) completed_date,
[182](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:182) declined_comment,
[183](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:183) declined_date,
[184](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:184) description,
[185](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:185) dispatcher,
[186](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:186) due_date,
[187](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:187) in_progress_date,
[188](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:188) location,
[189](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:189) notes,
[190](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:190) paused_date,
[191](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:191) priority,
[192](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:192) status,
[193](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:193) work_order_id,
[194](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:194) worker,
[195](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/managers.py:195) )
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\apps\workforce\_store\assignments.py:127](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:127), in add_assignment(project, feature, geometry, assignment_type, assigned_date, assignment_read, completed_date, declined_comment, declined_date, description, dispatcher, due_date, in_progress_date, location, notes, paused_date, priority, status, work_order_id, worker)
[103](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:103) project._update_cached_objects()
[104](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:104) assignment = workforce.Assignment(
[105](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:105) project,
[106](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:106) feature,
(...)
[124](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:124) worker,
[125](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:125) )
--> [127](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:127) return add_assignments(project, [assignment])[0]
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\apps\workforce\_store\assignments.py:74](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:74), in add_assignments(project, assignments)
[71](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:71) use_global_ids = False
[73](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:73) features = [assignment.feature for assignment in assignments]
---> [74](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:74) add_features(project.assignments_layer, features, use_global_ids)
[75](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/assignments.py:75) return assignments
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\apps\workforce\_store\utils.py:30](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:30), in add_features(feature_layer, features, use_global_ids)
[28](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:28) if features:
[29](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:29) feature_set = FeatureSet(features)
---> [30](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:30) response = feature_layer.edit_features(
[31](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:31) adds=feature_set,
[32](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:32) use_global_ids=use_global_ids,
[33](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:33) future=_should_use_async_apply_edits(feature_layer),
[34](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:34) )
[35](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:35) if _should_use_async_apply_edits(feature_layer):
[36](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/apps/workforce/_store/utils.py:36) add_results = response.result()[0]["addResults"]
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\features\layer.py:3281](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3281), in FeatureLayer.edit_features(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)
[3279](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3279) else:
[3280](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3280) vi = None
-> [3281](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3281) return apply_edits(
[3282](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3282) fl=self,
[3283](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3283) adds=adds,
[3284](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3284) updates=updates,
[3285](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3285) deletes=deletes,
[3286](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3286) attachments=None,
[3287](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3287) version_info=vi,
[3288](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3288) use_global_ids=use_global_ids,
[3289](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3289) return_edit_moment=return_edit_moment,
[3290](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3290) rollback=rollback_on_failure,
[3291](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3291) true_curve_client=true_curve_client,
[3292](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3292) datum_transformation=datum_transformation,
[3293](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3293) )
[3294](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3294) elif self._gis.version < [11, 1] and future:
[3295](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/layer.py:3295) params["async"] = True
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\site-packages\arcgis\features\_edit\api.py:169](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:169), in apply_edits(fl, adds, updates, deletes, attachments, use_global_ids, version_info, return_edit_moment, rollback, true_curve_client, datum_transformation, time_reference, return_edit_results)
[167](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:167) fp = os.path.join(folder, f"{uuid.uuid4().hex}.json")
[168](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:168) with open(fp, "w") as writer:
--> [169](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:169) writer.write(json.dumps(data))
[170](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:170) mgr = fl._upload_manager
[171](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/site-packages/arcgis/features/_edit/api.py:171) upload = mgr.upload(path=fp)
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\json\__init__.py:231](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:231), in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
[226](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:226) # cached encoder
[227](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:227) if (not skipkeys and ensure_ascii and
[228](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:228) check_circular and allow_nan and
[229](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:229) cls is None and indent is None and separators is None and
[230](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:230) default is None and not sort_keys and not kw):
--> [231](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:231) return _default_encoder.encode(obj)
[232](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:232) if cls is None:
[233](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/__init__.py:233) cls = JSONEncoder
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\json\encoder.py:200](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:200), in JSONEncoder.encode(self, o)
[196](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:196) return encode_basestring(o)
[197](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:197) # This doesn't pass the iterator directly to ''.join() because the
[198](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:198) # exceptions aren't as detailed. The list call should be roughly
[199](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:199) # equivalent to the PySequence_Fast that ''.join() would do.
--> [200](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:200) chunks = self.iterencode(o, _one_shot=True)
[201](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:201) if not isinstance(chunks, (list, tuple)):
[202](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:202) chunks = list(chunks)
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\json\encoder.py:258](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:258), in JSONEncoder.iterencode(self, o, _one_shot)
[253](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:253) else:
[254](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:254) _iterencode = _make_iterencode(
[255](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:255) markers, self.default, _encoder, self.indent, floatstr,
[256](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:256) self.key_separator, self.item_separator, self.sort_keys,
[257](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:257) self.skipkeys, _one_shot)
--> [258](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:258) return _iterencode(o, 0)
File [c:\SCM\PYTHON_ENVS\CONDA_ENVS\dev_arcgis_3_11_app\Lib\json\encoder.py:180](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:180), in JSONEncoder.default(self, o)
[161](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:161) def default(self, o):
[162](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:162) """Implement this method in a subclass such that it returns
[163](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:163) a serializable object for ``o``, or calls the base implementation
[164](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:164) (to raise a ``TypeError``).
(...)
[178](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:178)
[179](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:179) """
--> [180](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:180) raise TypeError(f'Object of type {o.__class__.__name__} '
[181](file:///C:/SCM/PYTHON_ENVS/CONDA_ENVS/dev_arcgis_3_11_app/Lib/json/encoder.py:181) f'is not JSON serializable')
TypeError: Object of type FeatureSet is not JSON serializable
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
Need to create the assignment in workforce when a point geometry is passed.
Platform (please complete the following information):
OS: windows
Python API Version [ 2.3.0]
Additional context
Add any other context about the problem here, attachments etc.
Is this being looked into? I too recently experienced the same issue when updating to latest ArcGIS Pro 3.3.1. Ended up reverting back to earlier ArcGIS Pro 3.2.2 and associated Python API version of 2.2.0.1.
Describe the bug When type "arcgis.geometry._types.Point" is passed to geometry parameter for assignment.add(), I am getting "TypeError: Object of type FeatureSet is not JSON serializable error". The error is same even if I pass in dictionary type. The issue did't exist in version 2.1.04.
To Reproduce Attached Screenshot error:
Screenshots If applicable, add screenshots to help explain your problem.
Expected behavior
Need to create the assignment in workforce when a point geometry is passed.
Platform (please complete the following information):
Additional context Add any other context about the problem here, attachments etc.