ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Server error (list index out of range)


#1

Server Error: Please check your server logs or contact tech support.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 257, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 219, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 866, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 762, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1037, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1020, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 756, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py”, line 44, in validate
super(PurchaseOrder, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 35, in validate
super(BuyingController, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 17, in validate
super(StockController, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 41, in validate
self.set_missing_values(for_validate=True)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 70, in set_missing_values
self.set_missing_item_details(for_validate)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 202, in set_missing_item_details
ret = get_item_details(args)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 65, in get_item_details
get_price_list_rate(args, item_doc, out)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 308, in get_price_list_rate
price_list_rate = get_price_list_rate_for(args.price_list, item_doc.name)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 361, in get_price_list_rate_for
{“price_list”: price_list, “item_code”: item_code}, “price_list_rate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 472, in get_value
order_by, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 516, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 650, in _get_values_from_table
conditions, values = self.build_conditions(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 436, in build_conditions
_build_condition(f)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 403, in _build_condition
_operator = value[0]
IndexError: list index out of range

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 942, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 257, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 219, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 866, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 762, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1037, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1020, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 756, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py”, line 44, in validate
super(PurchaseOrder, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 35, in validate
super(BuyingController, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 17, in validate
super(StockController, self).validate()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 41, in validate
self.set_missing_values(for_validate=True)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 70, in set_missing_values
self.set_missing_item_details(for_validate)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 202, in set_missing_item_details
ret = get_item_details(args)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 65, in get_item_details
get_price_list_rate(args, item_doc, out)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 308, in get_price_list_rate
price_list_rate = get_price_list_rate_for(args.price_list, item_doc.name)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/get_item_details.py”, line 361, in get_price_list_rate_for
{“price_list”: price_list, “item_code”: item_code}, “price_list_rate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 472, in get_value
order_by, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 516, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 650, in _get_values_from_table
conditions, values = self.build_conditions(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 436, in build_conditions
_build_condition(f)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 403, in _build_condition
_operator = value[0]
IndexError: list index out of range

HOW TO RESOLVE THIS ERROR PLEASE HELP


#2

@abhishekgupta, We just fixed this error, can you update your system to latest changes and check if it still exists?