This is the full text of the error it’s throwing:
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 310, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 332, in _save
return self.insert()
File “apps/frappe/frappe/model/document.py”, line 261, in insert
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1052, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1259, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1241, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 938, in fn
return method_object(*args, **kwargs)
File “apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 44, in validate
super(SalesOrder, self).validate()
File “apps/erpnext/erpnext/controllers/selling_controller.py”, line 32, in validate
super(SellingController, self).validate()
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 38, in validate
super(StockController, self).validate()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 166, in validate
self.validate_all_documents_schedule()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 272, in validate_all_documents_schedule
self.validate_non_invoice_documents_schedule()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 265, in validate_non_invoice_documents_schedule
self.validate_payment_schedule_dates()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 1684, in validate_payment_schedule_dates
frappe.throw(
File “apps/frappe/frappe/init.py”, line 504, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 479, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 434, 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’