No JSON object could be decoded
Closed this issue · 9 comments
Any help
Installing expense_request...
Updating DocTypes for expense_request: [========================================]
bad json: /home/frappe/frappe-bench/apps/expense_request/expense_request/fixtures/notification.json
An error occurred while installing expense_request:
No JSON object could be decoded
Thanks for reporting this!
First, you need to remove the failed install doctypes.
Using developer mode or search, Go to
- Customisation (Module)
- Doctype - Delete Expense Entry if present
- Module Def - Delete Expense Request
Update the app
cd apps/expense_request
git pull
cd ..
bench restart
Then install again.
bench --site site_name install-app expense_request
Hi thanks for your help i follow the steps you mention
Change to developer mode on site_config.json
[frappe@app frappe-bench]$ vi ./sites/site1.local/site_config.json
add line on file
"developer_mode": "1",
go to Module def and try to delete it and get errors on report
Please type some additional information that could help us reproduce this issue:
App Versions
{
"erpnext": "12.13.0",
"frappe": "12.11.0"
}
Route
Form/DocType/Expense Entry
Error Report
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 64, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 59, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 24, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 64, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1064, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py", line 70, in getdoctype
docs = get_meta_bundle(doctype)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py", line 80, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py", line 29, in get_meta
meta = FormMeta(doctype)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py", line 39, in __init__
self.load_assets()
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py", line 49, in load_assets
self.add_code()
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py", line 81, in add_code
path = os.path.join(get_module_path(self.module), 'doctype', scrub(self.name))
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 166, in get_module_path
return frappe.get_module_path(module)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 852, in get_module_path
return get_pymodule_path(local.module_app[module] + "." + module, *joins)
KeyError: u'expense_request'
Request Data
{
"type": "GET",
"args": {
"doctype": "Expense Entry",
"with_parent": 1,
"cached_timestamp": null
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.load.getdoctype"
}
Response JSON
{}
Sorry for the trouble, let me revert once I find a fix for this. Is this happening during installation?
hi this happens at the moment of delete module def and then doctype, Im trying to delete all and then install again clean
Doctype - Delete Expense Entry if present
Module Def - Delete Expense Request
Basically im unable to delete Expense Entry and Expense Request from GUI to install from scratch
give me errors bellow
I also delete folder on apps and do
bench --site site1.local remove-from-installed-apps expense_request
and also restart server
Any help will be appreciate
Hello @raqmudy
If developer_mode is on, please delete the app folder and remove its entry from <bench>/sites/app.txt
Then do bench --site site_name migrate
Edit
Do bench restart
to make sure that the python files refresh as well.
Hi thx for help I follow the procedure
Remove app from apps.txt
Remove the folder from apps folder
Run command
bench --site site1.local remove-from-installed-apps expense_request
and this report
Please type some additional information that could help us reproduce this issue:
App Versions
{
"erpnext": "12.13.0",
"frappe": "12.11.0"
}
Route
Form/DocType/Expense Entry
Error Report
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 64, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 59, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 24, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 64, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1064, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/client.py", line 241, in delete
frappe.delete_doc(doctype, name, ignore_missing=False)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 805, in delete_doc
ignore_permissions, flags, ignore_on_trash, ignore_missing)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 82, in delete_doc
delete_controllers(name, doc.module)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 356, in delete_controllers
module_path = get_module_path(module)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 852, in get_module_path
return get_pymodule_path(local.module_app[module] + "." + module, *joins)
KeyError: u'expense_request'
Request Data
{
"type": "POST",
"args": {
"doctype": "DocType",
"name": "Expense Entry"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.client.delete"
}
Response JSON
{}
Any help will be appreciate
Regards
Hello @raqmudy
Sorry for not getting back to you earlier. Have you been able to resolve this?
I was no able to make it work same error still also could not delete custom doctype, I would like to use the module
regards
Mauriel