You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered 2 errors as below, @neilLasrado and @anandpdoshi please let me know if you need more information:
The below one happens when I tried to set the increment to 0.001 in float attributes when the float precision was set to 2 in the setup. Also it happened with float precision set to 3.
Traceback (innermost last):
File "/home/aditya/frappe-bench/apps/frappe/frappe/app.py", line 66, in application
response = frappe.handler.handle()
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 74, in handle
execute_cmd(cmd)
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 756, in call
return fn(*args, **newargs)
File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 506, in get_variant
if (not values.from_range < cint(args[d]) < values.to_range) or ((cint(args[d]) - values.from_range) % values.increment != 0):
ZeroDivisionError: float modulo
The below error happens if you follow the following steps:
Create a Template.
Goto Item List
Filter items has variants = yes (ensure that only 1 template is there)
Now click on New Item this item would have has variant as that template
save item and you get the below error
Traceback (innermost last):
File "/home/aditya/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 18, in savedocs
doc.save()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 216, in save
self.insert()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 178, in insert
self.run_before_save_methods()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 543, in run_before_save_methods
self.run_method("validate")
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 509, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 636, in composer
return composed(self, method, *args, **kwargs)
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 619, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 503, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 67, in validate
self.validate_variant_attributes()
File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 353, in validate_variant_attributes
variant = get_variant(self.variant_of, args)
File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 528, in get_variant
variant= frappe.db.sql("""select i.name from tabItem i where {0}""".format(conds))
File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 146, in sql
self._cursor.execute(query)
File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and not exists (select iv.name from `tabItem Variant Attribute` iv where iv.pare' at line 1")
Traceback (innermost last):
File "/home/aditya/frappe-bench/apps/frappe/frappe/app.py", line 66, in application
response = frappe.handler.handle()
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 74, in handle
execute_cmd(cmd)
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 756, in call
return fn(*args, **newargs)
File "/home/aditya/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 18, in savedocs
doc.save()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 216, in save
self.insert()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 178, in insert
self.run_before_save_methods()
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 543, in run_before_save_methods
self.run_method("validate")
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 509, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 636, in composer
return composed(self, method, *args, **kwargs)
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 619, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 503, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 67, in validate
self.validate_variant_attribute
The text was updated successfully, but these errors were encountered:
Hi,
I have encountered 2 errors as below, @neilLasrado and @anandpdoshi please let me know if you need more information:
The below one happens when I tried to set the increment to 0.001 in float attributes when the float precision was set to 2 in the setup. Also it happened with float precision set to 3.
The below error happens if you follow the following steps:
The text was updated successfully, but these errors were encountered: