frappe-client
frappe-client copied to clipboard
Issue in update doc
Traceback (most recent call last):
File "/home/mahmoud/frappe-bench/apps/retail_comparison/retail_comparison/api_import_data/kheirzaman_additem.py", line 110, in <module>
client.update(update_doc)
File "/home/mahmoud/frappe-bench/apps/retail_comparison/retail_comparison/api_import_data/frappeclient/frappeclient.py", line 114, in update
url = self.url + "/api/resource/" + quote(doc.get("doctype")) + "/" + quote(doc.get("name"))
File "/usr/lib/python3.10/urllib/parse.py", line 881, in quote
return quote_from_bytes(string, safe)
File "/usr/lib/python3.10/urllib/parse.py", line 906, in quote_from_bytes
raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes
However the insert is running good !
I found the solution replace the line number 114 in the file frappeclient/frappeclient.py with url = self.url + "/api/resource/" + quote(str(doc.get("doctype"))) + "/" + quote(str(doc.get("name")))