Server Error TypeError: 'str' object does not support item assignment

While creating a New Release Group error shows up:

App Versions

{
	"frappe": "15.11.0",
	"payments": "0.0.1",
	"press": "0.7.0"
}

Route

Form/Release Group/new-release-group-fqzfckmxhc

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1682, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 18, in savedocs
    doc = frappe.get_doc(json.loads(doc))
  File "apps/frappe/frappe/__init__.py", line 1265, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 82, in get_doc
    return controller(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 132, in __init__
    super().__init__(kwargs)
  File "apps/frappe/frappe/model/base_document.py", line 134, in __init__
    self.update(d)
  File "apps/frappe/frappe/model/base_document.py", line 184, in update
    self.set(key, value, as_value=ignore_children)
  File "apps/frappe/frappe/model/base_document.py", line 236, in set
    self.extend(key, value)
  File "apps/frappe/frappe/model/base_document.py", line 294, in extend
    self.append(key, v)
  File "apps/frappe/frappe/model/base_document.py", line 262, in append
    ret_value = self._init_child(value, key)
  File "apps/frappe/frappe/model/base_document.py", line 307, in _init_child
    value["doctype"] = doctype
TypeError: 'str' object does not support item assignment

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Release Group\",\"name\":\"new-release-group-fizdorsudb\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"enabled\":1,\"default\":0,\"public\":0,\"central_bench\":0,\"servers\":[],\"apps\":[{\"docstatus\":0,\"doctype\":\"Release Group App\",\"name\":\"new-release-group-app-xdthdcvmro\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"enable_auto_deploy\":0,\"parent\":\"new-release-group-fizdorsudb\",\"parentfield\":\"apps\",\"parenttype\":\"Release Group\",\"idx\":1,\"__unedited\":false,\"title\":\"Frappe\",\"app\":\"frappe\",\"source\":\"SRC-frappe-001\"}],\"common_site_config_table\":\"{}\",\"common_site_config\":\"{}\",\"bench_config\":\"{}\",\"gunicorn_threads_per_worker\":0,\"dependencies\":[],\"packages\":[],\"environment_variables\":[],\"mounts\":[],\"is_redisearch_enabled\":0,\"is_push_to_deploy_enabled\":0,\"is_delta_build_enabled\":0,\"merge_all_rq_queues\":0,\"merge_default_and_short_rq_queues\":0,\"use_rq_workerpool\":0,\"saas_bench\":0,\"tags\":[],\"is_code_server_enabled\":0,\"title\":\"XRP Release Group\",\"version\":\"Nightly\",\"team\":\"898f4e85d6\"}",
		"action": "Save"
	},
	"btn": {
		"jQuery3700225221353510027141": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 2780,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": null
}

Response Data

{
	"exception": "TypeError: 'str' object does not support item assignment",
	"exc_type": "TypeError"
}

Change frappe branch to “develop” branch

1 Like

worked. Tnx

I changed but didn’t work
any hints