UOMMustBeIntegerError: Quantity (1.436) cannot be a fraction in row 1

Hello Guys,

I have this error log recurring every hour for months now. I can’t trace the Invoice producing it, thus have no idea where to begin resolving it.

Error Log:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 505, in save_invoice
    si.insert(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 218, in insert
    self.run_before_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 859, in run_before_save_methods
    self.run_method("validate")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 66, in validate
    self.validate_uom_is_integer("stock_uom", "stock_qty")
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/utilities/transaction_base.py", line 71, in validate_uom_is_integer
    validate_uom_is_integer(self, uom_field, qty_fields)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/utilities/transaction_base.py", line 158, in validate_uom_is_integer
    frappe.throw(_("Quantity ({0}) cannot be a fraction in row {1}").format(qty, d.idx), UOMMustBeIntegerError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 323, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
    raise raise_exception(encode(msg))
UOMMustBeIntegerError: Quantity (1.436) cannot be a fraction in row 1

Any help resolving this will be greatly appreciate.

Just a thought - there’s this but no hard details The counter at Account/Sales Invoice still remains red - #5 by clarkej

Have you identified say the scheduler process?

edit: Find a report or query your database for a list of unsaved pos sales invoices?

Hmmm. Let me look into this. Whats the way to identify this scheduler process?

Thanks for your answer Clarke

You need to inspect one of the logs for eg
frappe@erpnext:~/frappe-bench$ find logs -name ‘*.log’ | xargs grep schedule

What version are you running?

Hello Clarke,

I’m using:

ERPNext: v10.1.4 (master)

Frappe Framework: v10.1.1 (master)

I’m still looking through the logs, haven’t yet identified the one these errors are going to.

You may be on to something about unsaved invoices. I’ll need to pass through the shop sometime on check on the offline invoices, I think a user might have entered a fraction quantity for a non fraction item.

Thanks again.

The POS Module does not properly validate for non-fractional UOMs. The invoice remains stuck in the POS with repetitive System Errors popping up. Instead, the POS should synch these invoices to Invoices List where the “Supervisor” can fix the problem.

I think this is the best way to handle this issue.