when i am renaming document this error shows and not changing (this happening in many doctype)
Traceback (most recent call last):
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1520, in queue_action
12:12:47 web.1 | self.lock()
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1574, in lock
12:12:47 web.1 | raise frappe.DocumentLockedError
12:12:47 web.1 | frappe.exceptions.DocumentLockedError
12:12:47 web.1 |
12:12:47 web.1 | During handling of the above exception, another exception occurred:
12:12:47 web.1 |
12:12:47 web.1 | Traceback (most recent call last):
12:12:47 web.1 | File "apps/frappe/frappe/app.py", line 110, in application
12:12:47 web.1 | response = frappe.api.handle(request)
12:12:47 web.1 | File "apps/frappe/frappe/api/__init__.py", line 49, in handle
12:12:47 web.1 | data = endpoint(**arguments)
12:12:47 web.1 | File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
12:12:47 web.1 | return frappe.handler.handle()
12:12:47 web.1 | File "apps/frappe/frappe/handler.py", line 49, in handle
12:12:47 web.1 | data = execute_cmd(cmd)
12:12:47 web.1 | File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
12:12:47 web.1 | return frappe.call(method, **frappe.form_dict)
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 1761, in call
12:12:47 web.1 | return fn(*args, **newargs)
12:12:47 web.1 | File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
12:12:47 web.1 | return func(*args, **kwargs)
12:12:47 web.1 | File "apps/frappe/frappe/model/rename_doc.py", line 89, in update_document_title
12:12:47 web.1 | doc.queue_action("rename", name=transformed_name, merge=merge, queue=queue)
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1535, in queue_action
12:12:47 web.1 | frappe.throw(
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 645, in throw
12:12:47 web.1 | msgprint(
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 610, in msgprint
12:12:47 web.1 | _raise_exception()
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
12:12:47 web.1 | raise exc
12:12:47 web.1 | frappe.exceptions.ValidationError: This document is currently locked and queued for execution. Please try again after some time.
NCP
May 2, 2024, 6:53am
2
Please check whether the scheduler is enabled or not.
Go to the RQ Job and check the status.
NCP
May 2, 2024, 6:57am
4
check status, any failed or not. otherwise restart the bench and check it.
I tried restart, clear-cache and bench migrate, not working
@NCP
is there any need to raise issue in github ?
NCP
May 2, 2024, 7:33am
7
which document are you renaming?
i tried in Print Format List and Item Group List
after bench restart i am getting Error with button
and when i am click on it will show another error
Route
Form/Print Format/Dispatch Labels Mulptiple
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 1761, 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/model/document.py", line 1742, in unlock_document
doctype = str(args["doctype"])
TypeError: string indices must be integers
Request Data
{
"type": "POST",
"args": {
"args": "{\"doctype\":\"Print Format\",\"name\":\"Dispatch Labels Mulptiple\"}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.model.document.unlock_document",
"request_id": null
}
Response Data
{
"exception": "TypeError: string indices must be integers",
"exc_type": "TypeError"
}
NCP
May 2, 2024, 8:56am
10
Which version are you using?
v14 or v15?
Document renaming working well in Item doctype
I too facing the same ERROR.
request.js:268
POST https://<domain.com>/api/method/frappe.model.rename_doc.update_document_title 417 (EXPECTATION FAILED)
Traceback (most recent call last):
File "apps/frappe/frappe/model/document.py", line 1460, in queue_action
self.lock()
File "apps/frappe/frappe/model/document.py", line 1490, in lock
raise frappe.DocumentLockedError
frappe.exceptions.DocumentLockedError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 94, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 47, 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 1619, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/model/rename_doc.py", line 88, in update_document_title
doc.queue_action("rename", name=transformed_name, merge=merge)
File "apps/frappe/frappe/model/document.py", line 1462, in queue_action
frappe.throw(
File "apps/frappe/frappe/__init__.py", line 533, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 501, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 450, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: This document is currently queued for execution. Please try again
ERPNext & Frappe: Version-14
I raise issue in Frappe Github
opened 11:51AM - 02 May 24 UTC
closed 01:26PM - 03 May 24 UTC
bug
when i am renaming document this error shows and not changing (this happening in… "Print Format" and "Item Group" doctype)
![image](https://github.com/frappe/frappe/assets/135511086/dc768ec9-85e0-4d7e-9005-68e9a798537d)
```
Traceback (most recent call last):
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1520, in queue_action
12:12:47 web.1 | self.lock()
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1574, in lock
12:12:47 web.1 | raise frappe.DocumentLockedError
12:12:47 web.1 | frappe.exceptions.DocumentLockedError
12:12:47 web.1 |
12:12:47 web.1 | During handling of the above exception, another exception occurred:
12:12:47 web.1 |
12:12:47 web.1 | Traceback (most recent call last):
12:12:47 web.1 | File "apps/frappe/frappe/app.py", line 110, in application
12:12:47 web.1 | response = frappe.api.handle(request)
12:12:47 web.1 | File "apps/frappe/frappe/api/__init__.py", line 49, in handle
12:12:47 web.1 | data = endpoint(**arguments)
12:12:47 web.1 | File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
12:12:47 web.1 | return frappe.handler.handle()
12:12:47 web.1 | File "apps/frappe/frappe/handler.py", line 49, in handle
12:12:47 web.1 | data = execute_cmd(cmd)
12:12:47 web.1 | File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
12:12:47 web.1 | return frappe.call(method, **frappe.form_dict)
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 1761, in call
12:12:47 web.1 | return fn(*args, **newargs)
12:12:47 web.1 | File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
12:12:47 web.1 | return func(*args, **kwargs)
12:12:47 web.1 | File "apps/frappe/frappe/model/rename_doc.py", line 89, in update_document_title
12:12:47 web.1 | doc.queue_action("rename", name=transformed_name, merge=merge, queue=queue)
12:12:47 web.1 | File "apps/frappe/frappe/model/document.py", line 1535, in queue_action
12:12:47 web.1 | frappe.throw(
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 645, in throw
12:12:47 web.1 | msgprint(
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 610, in msgprint
12:12:47 web.1 | _raise_exception()
12:12:47 web.1 | File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
12:12:47 web.1 | raise exc
12:12:47 web.1 | frappe.exceptions.ValidationError: This document is currently locked and queued for execution. Please try again after some time.
```
------------------------------------------------------------------------------------------------------------------
after bench restart i am getting Error with button
![image](https://github.com/frappe/frappe/assets/135511086/bf3db757-5067-4d1f-95fe-5353dc0b4054)
and when i am click on it will show another error
![image](https://github.com/frappe/frappe/assets/135511086/cc7c258f-17f3-4e55-9c8d-440bb22ab732)
### Route
```
Form/Print Format/Dispatch Labels Mulptiple
```
### 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 1761, 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/model/document.py", line 1742, in unlock_document
doctype = str(args["doctype"])
TypeError: string indices must be integers
```
### Request Data
```
{
"type": "POST",
"args": {
"args": "{\"doctype\":\"Print Format\",\"name\":\"Dispatch Labels Mulptiple\"}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.model.document.unlock_document",
"request_id": null
}
```
### Response Data
```
{
"exception": "TypeError: string indices must be integers",
"exc_type": "TypeError"
}
```
i think it will resolve in next update
Thanks for the update.
I solved this by deleting the lock file.
/home/frappe/frappe-bench/sites/sitename/locks
1 Like