Interpreting "Did Not Save" Message

What scenario causes this error?

Traceback (innermost last): File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range
Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
The message is clear that gl_map is a blank list, but the code should not executed if gl_map is blank. There is a check in line 15 of general_ledger.py

On 22-Jan-2014, at 8:18 AM, CJ wrote:

What scenario causes this error?

Traceback (innermost last): File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range
Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Thanks. So is there something I need to check in the DN entry that I did not key correctly?

On Wednesday, 22 January 2014 13:30:06 UTC+8, Nabin Hait wrote:
The message is clear that gl_map is a blank list, but the code should not executed if gl_map is blank. There is a check in line 15 of general_ledger.py

On 22-Jan-2014, at 8:18 AM, CJ wrote:

What scenario causes this error?

Traceback (innermost last): File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range
Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Its hard to say. Can you replicate this error in https://demo.erpnext.com? Also do you have any customizations that could cause this error?

On Wednesday, January 22, 2014 11:32:37 AM UTC+5:30, CJ wrote:
Thanks. So is there something I need to check in the DN entry that I did not key correctly?

On Wednesday, 22 January 2014 13:30:06 UTC+8, Nabin Hait wrote:
The message is clear that gl_map is a blank list, but the code should not executed if gl_map is blank. There is a check in line 15 of general_ledger.py

On 22-Jan-2014, at 8:18 AM, CJ wrote:

What scenario causes this error?

Traceback (innermost last): File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range
Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/widgets/form/save.py", line 18, in savedocs getattr(wrapper, action.lower())() File "lib/webnotes/model/bean.py", line 321, in submit self.run_method('on_submit') File "lib/webnotes/model/bean.py", line 239, in run_method getattr(self.controller, method)(*args, **kwargs) File "app/stock/doctype/delivery_note/delivery_note.py", line 163, in on_submit self.make_gl_entries() File "app/controllers/stock_controller.py", line 23, in make_gl_entries make_gl_entries(gl_entries) File "app/accounts/general_ledger.py", line 18, in make_gl_entries save_entries(gl_map, adv_adj, update_outstanding) File "app/accounts/general_ledger.py", line 63, in save_entries validate_account_for_auto_accounting_for_stock(gl_map) File "app/accounts/general_ledger.py", line 92, in validate_account_for_auto_accounting_for_stock if gl_map[0].voucher_type=="Journal Voucher": IndexError: list index out of range

-




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.