Script Report Error

Hi ,

I made a script report to show the Against Account in Ledger. Script is copied from general ledger report and made necessary changes to show Against account. The following error shows in the console while running the report 
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/query_report.py", line 84, in run columns, result = namespace["execute"](filters or {}) File "<string>", line 20, in execute File "<string>", line 69, in get_gl_entries 
TypeError: sequence item 1: expected string or Unicode, float found

Can anyone help me   ?



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.
Without looking at code, it is difficult to point out the exact issue. Still looking like it is not getting correct values to create voucher link html.

Check values of d[4] and d[5] in following line:
 
icon = """<a href="%s"><i class="icon icon-share" style="cursor: pointer;"></i></a>""" \
% ("/".join(["#Form", d[4], d[5]]),)


On 25-Dec-2013, at 12:47 PM, Shameem Mohammed wrote:

Hi ,

I made a script report to show the Against Account in Ledger. Script is copied from general ledger report and made necessary changes to show Against account. The following error shows in the console while running the report 
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/query_report.py", line 84, in run columns, result = namespace["execute"](filters or {}) File "<string>", line 20, in execute File "<string>", line 69, in get_gl_entries 
TypeError: sequence item 1: expected string or Unicode, float found

Can anyone help me   ?



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.

    <ledger.txt><ledger.js><ledger.py><screen.png>



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.