I was trying to test my whitelisted methods, but whenever I use the URL: http://localhost:8000/api/, it returns the following error:
Server Error
Traceback (most recent call last):
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 127, in handle
raise frappe.DoesNotExistError
DoesNotExistError
Page missing or moved
We are very sorry for this, but the page you are looking for is missing (this could be because of a typo in the address) or moved.
Actually the problem is not in my code, the same code was working with no errors.
There is another error that appears in the desk, tools >
Traceback (most recent call last):
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 40, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 896, in call
return fn(*args, **newargs)
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 14, in get
data = get_data(module)
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 30, in get_data
data = build_config_from_file(module)
File “/home/ghadeer/frappe/frappe-bench/apps/frappe/frappe/desk/moduleview.py”, line 54, in build_config_from_file
data += get_config(app, module)
I used to call it using REST API like this:
localhost:8000/api/method/matajer.update_order?order_name=ORD-00002&order_price=500&customer_id=000&status=Unpaid&product_name=Test&product_price=200&product_image=pdpd.jpg
and it was working very well, but now and after doing bench update, when I try the same link it returns:
404 Not found error
Not Found
Invalid method
and I am sure that the link is correct, so I started testing the api itself typing localhost:8000/api/ and it always give me server error that it does not exist !
The same is happening with all the methods that I am trying to call using REST api !!