Guys, I am newcomer in erpnext.
Could you please explain me why I can’t run python script with frappe as ussual.
For example I try to run tests:
frappe@erpnext:~/frappe-bench/apps/frappe/frappe$ python test_runner.py
Traceback (most recent call last):
File “test_runner.py”, line 6, in
import frappe
ImportError: No module named frappe
but if I run bench run-tests it works
I can’t understand import frappe magic configuration)
I just want create my custom script and run it.
For example my script:
import frappe
if name == "__main__":
frappe.connect()
frappe.clear_cache()
frappe.db.sql("select name from tabCompany")
How to run it and resolve error:
ImportError: No module named frappe ?