Hi All,
I have installed the libracore woocommerce connecter but when i try to sync, it fails with the below trace.
Traceback (most recent call last):
File “apps/woocommerceconnector/woocommerceconnector/sync_orders.py”, line 30, in sync_woocommerce_orders
create_order(woocommerce_order, woocommerce_settings)
File “apps/woocommerceconnector/woocommerceconnector/sync_orders.py”, line 164, in create_order
so = create_sales_order(woocommerce_order, woocommerce_settings, company)
File “apps/woocommerceconnector/woocommerceconnector/sync_orders.py”, line 225, in create_sales_order
so.save(ignore_permissions=True)
File “apps/frappe/frappe/model/document.py”, line 287, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 309, in save
return self.insert()
File “apps/frappe/frappe/model/document.py”, line 240, in insert
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 971, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 869, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1161, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1144, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 866, in fn
return method_object(*args, **kwargs)
File “apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 42, in validate
super(SalesOrder, self).validate()
File “apps/erpnext/erpnext/controllers/selling_controller.py”, line 30, in validate
super(SellingController, self).validate()
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 30, in validate
super(StockController, self).validate()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 141, in validate
self.validate_all_documents_schedule()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 213, in validate_all_documents_schedule
self.validate_non_invoice_documents_schedule()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 206, in validate_non_invoice_documents_schedule
self.validate_payment_schedule_dates()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 1356, in validate_payment_schedule_dates
frappe.throw((“Row {0}: Due Date in the Payment Terms table cannot be before Posting Date”).format(d.idx))
File “apps/frappe/frappe/init.py”, line 444, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “apps/frappe/frappe/init.py”, line 423, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 378, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Row 1: Due Date in the Payment Terms table cannot be before Posting Date
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “apps/woocommerceconnector/woocommerceconnector/api.py”, line 52, in sync_woocommerce_resources
sync_orders()
File “apps/woocommerceconnector/woocommerceconnector/sync_orders.py”, line 15, in sync_orders
sync_woocommerce_orders()
File “apps/woocommerceconnector/woocommerceconnector/sync_orders.py”, line 37, in sync_woocommerce_orders
if e.args and e.args[0] and e.args[0].decode(“utf-8”).startswith(“402”):
AttributeError: ‘str’ object has no attribute ‘decode’
I originally thought it was due to the time being out on the two servers, but this has now been synchronized and i still get this error. Any ideas please?