I received this error after updating ERPNext without having made any changes (I did it thinking that there had been an error, then I decided to update the application again).
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 939, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 81, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py", line 21, in runserverobj
doc = frappe.get_doc(json.loads(docs))
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
What is the cause of this error?
That is, what must happen so that a JSON file, which has no errors and works well, cannot be decoded?
No I meant he/she can use Visual Studio Code, open the erpnext folder in it. Now the files which are flagged can found out easily then. it marks those folders with problematic files in red
I am using ERPNext on a VBox Virtual Machine with Ubuntu, so I cannot directly access the ERPNext folder, otherwise, I have copied the files from the Virtual Machine and opened the folder with VSCode, but I have not seen any files/folders marked.
This is a strange problem @clarkej, because before updating the system with the bench commands, everything worked fine and I have not edited the JSON file for several months, so I do not understand why this problem occurs.
Ideally if you could put a set_trace() breakpoint to run a pdb session to check this out.
“so I cannot directly access the ERPNext folder,”
I am not sure what you mean here - you can access your VM server instance by say ssh to copy files. But you can’t access specific folders, please can you explain?
In my case I mangled the ipython command prompt with ansi color characters in an escape string.
I was on the staging branch, and backed out the problem with ‘git reset --hard’ on apps/erpnext and apps/frappe
My bench version is 4.1.0, and I do not know what do you refer with branch.
Also I do not know how to work with PDB because I am not very experienced with Python.
What I mean is that I cannot use VSCode to directly open the ERPNext folder, because VSCode is running on Windows on the host machine and ERPNext is running on Ubuntu on the virtual machine, but I can create a shared folder to be able to transfer files from one system to another.
Branch in Git is a version of your repository. e.g. master is the stable version of erpnext repository and develop is a version of erpnext having experimental features.
Have you a pointer to what you did followed to do this - perhaps that uses SMB - versus smino’s idea to use SSHFS to mount and access the VM file system?
You see it helps to maintain different versions and helps people work on it at the same time. What would you prefer - 10 branches of the erpnext app with different features or 10 different bench instances each size in GBs.