Trying import frappeclient

Im strying import frappeclient to insert a new doc using the following example:

from frappeclient import FrappeClient

client = FrappeClient("", "", "password")

# Prepare a customer dict that we will use to create a new
# customer in ERPNext
doc = {"doctype": "Customer",
       "customer_name": "Example Inc.",
       "customer_type": "Company",
       "website": ""}

# create new record in ERPNext

Error: no module named frappeclient

from frappe.frappeclient import FrappeClient

frappe@erpnext:~/frappe-bench$ find . -name

“no module named frappe.frappeclient”

“No such file or directory”

Any idea?

Do you mean to say you cannot access the file system or find

I don’t know, just not find it :frowning:

I found the file manually

That’s not much help to troubleshoot!

I can only assume you have no console access to your ERPNext server, possibly you are accessing say a VPS host.

It’s not a VPS host, but server host
Tried move the file to the same folder of but not worked at all

Why are you using frappeclient? Instead of that simple new_doc() or get_doc() is sufficient here.


	"doctype": "Customer",
	"customer_name": "Example Inc.",
	"customer_type": "Company",
	"website": "",
	"customer_group": "Government",
	"territory": "Rest Of The World"

ok so indeed you have console access!?

All I can suggest: To run in developer_mode with ‘bench start’, and routinely identify the results of your change in the frappe-bench/logs.

good luck

Cause this:

Yes, I’m doing a ssh to the machine and developing there.
I’ll try your suggestion

Thanks good feedback @Leonardo_Augusto - don’t fear a forum search for clues and answers ok!?