Error for listing Leads

Hi, 

When I click .../app.html#List/Lead to list the Leads, the following error appears:

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/load.py", line 63, in getdoctype doclist = webnotes.model.doctype.get(doctype, processed=True) File "lib/webnotes/model/doctype.py", line 51, in get add_code(doctype, doclist) File "lib/webnotes/model/doctype.py", line 276, in add_code add_embedded_js(doc) File "lib/webnotes/model/doctype.py", line 300, in add_embedded_js doc.fields['__js'] = re.sub('(wn.require\([^\)]*.)', _sub, doc.fields['__js']) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "lib/webnotes/model/doctype.py", line 295, in _sub return '\n' + unicode(f.read(), "utf-8") + '\n' UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1089: invalid continuation byte

How can I solve this?

Thanks,
Edney



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a94ec90e-6b82-42b8-a52e-8c6af85a997a%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Edney,

Did you edit lead.js file? Looks like some unexpected character in that file.

-Anand.


On Sat, Aug 9, 2014 at 9:11 PM, Edney Oliveira <ed...@gmail.com> wrote:
Hi,

When I click .../app.html#List/Lead to list the Leads, the following error appears:

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/load.py", line 63, in getdoctype doclist = webnotes.model.doctype.get(doctype, processed=True) File "lib/webnotes/model/doctype.py", line 51, in get add_code(doctype, doclist) File "lib/webnotes/model/doctype.py", line 276, in add_code add_embedded_js(doc) File "lib/webnotes/model/doctype.py", line 300, in add_embedded_js doc.fields['__js'] = re.sub('(wn.require\([^\)]*.)', _sub, doc.fields['__js']) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "lib/webnotes/model/doctype.py", line 295, in _sub return '\n' + unicode(f.read(), "utf-8") + '\n' UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1089: invalid continuation byte

How can I solve this?

Thanks,
Edney



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. 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.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. 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.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a94ec90e-6b82-42b8-a52e-8c6af85a997a%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF2viN-_DcNLJpdCeDp5Q6rtpZU6YsPx-gD1U%3D8jWZp%2BKA%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Anand,

     The error happens when the translation files (pt-BR-*.json) are in the folder. When I remove the files, the error does not happen anymore. I'm using the original installation files.

Edney

Em sábado, 9 de agosto de 2014 13h40min27s UTC-3, Anand Doshi escreveu:
Hi Edney,

Did you edit lead.js file? Looks like some unexpected character in that file.

-Anand.


On Sat, Aug 9, 2014 at 9:11 PM, Edney Oliveira <ed...@gmail.com> wrote:
Hi, 

When I click .../app.html#List/Lead to list the Leads, the following error appears:

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/load.py", line 63, in getdoctype doclist = webnotes.model.doctype.get(doctype, processed=True) File "lib/webnotes/model/doctype.py", line 51, in get add_code(doctype, doclist) File "lib/webnotes/model/doctype.py", line 276, in add_code add_embedded_js(doc) File "lib/webnotes/model/doctype.py", line 300, in add_embedded_js doc.fields['__js'] = re.sub('(wn.require\([^\)]*.)', _sub, doc.fields['__js']) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "lib/webnotes/model/doctype.py", line 295, in _sub return '\n' + unicode(f.read(), "utf-8") + '\n' UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1089: invalid continuation byte

How can I solve this?

Thanks,
Edney



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. 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.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. 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.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a94ec90e-6b82-42b8-a52e-8c6af85a997a%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/1ad8acb6-3b39-4b13-b294-0ad88ee7531a%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Anand,

     I found a contact_control.js that had been edited by another programmer. The hardest part was debuggin to find the  error.

Thanks,
Edney

Em sábado, 9 de agosto de 2014 14h19min46s UTC-3, Edney Oliveira escreveu:
Hi Anand,

     The error happens when the translation files (pt-BR-*.json) are in the folder. When I remove the files, the error does not happen anymore. I'm using the original installation files.

Edney

Em sábado, 9 de agosto de 2014 13h40min27s UTC-3, Anand Doshi escreveu:
Hi Edney,

Did you edit lead.js file? Looks like some unexpected character in that file.

-Anand.


On Sat, Aug 9, 2014 at 9:11 PM, Edney Oliveira <ed...@gmail.com> wrote:
Hi, 

When I click .../app.html#List/Lead to list the Leads, the following error appears:

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/load.py", line 63, in getdoctype doclist = webnotes.model.doctype.get(doctype, processed=True) File "lib/webnotes/model/doctype.py", line 51, in get add_code(doctype, doclist) File "lib/webnotes/model/doctype.py", line 276, in add_code add_embedded_js(doc) File "lib/webnotes/model/doctype.py", line 300, in add_embedded_js doc.fields['__js'] = re.sub('(wn.require\([^\)]*.)', _sub, doc.fields['__js']) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "lib/webnotes/model/doctype.py", line 295, in _sub return '\n' + unicode(f.read(), "utf-8") + '\n' UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1089: invalid continuation byte

How can I solve this?

Thanks,
Edney



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. 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.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. 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.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a94ec90e-6b82-42b8-a52e-8c6af85a997a%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4006a573-a4e1-46e2-885c-525bcf28ff14%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Hope you are using git version control. Such things become easier to trace to the commit. 

Sent from my phone

On 10-Aug-2014, at 7:13, Edney Oliveira <ed...@gmail.com> wrote:

Anand,

     I found a contact_control.js that had been edited by another programmer. The hardest part was debuggin to find the  error.

Thanks,
Edney

Em sábado, 9 de agosto de 2014 14h19min46s UTC-3, Edney Oliveira escreveu:
Hi Anand,

     The error happens when the translation files (pt-BR-*.json) are in the folder. When I remove the files, the error does not happen anymore. I'm using the original installation files.

Edney

Em sábado, 9 de agosto de 2014 13h40min27s UTC-3, Anand Doshi escreveu:
Hi Edney,

Did you edit lead.js file? Looks like some unexpected character in that file.

-Anand.


On Sat, Aug 9, 2014 at 9:11 PM, Edney Oliveira <ed...@gmail.com> wrote:
Hi, 

When I click .../app.html#List/Lead to list the Leads, the following error appears:

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/load.py", line 63, in getdoctype doclist = webnotes.model.doctype.get(doctype, processed=True) File "lib/webnotes/model/doctype.py", line 51, in get add_code(doctype, doclist) File "lib/webnotes/model/doctype.py", line 276, in add_code add_embedded_js(doc) File "lib/webnotes/model/doctype.py", line 300, in add_embedded_js doc.fields['__js'] = re.sub('(wn.require\([^\)]*.)', _sub, doc.fields['__js']) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "lib/webnotes/model/doctype.py", line 295, in _sub return '\n' + unicode(f.read(), "utf-8") + '\n' UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1089: invalid continuation byte

How can I solve this?

Thanks,
Edney



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. 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.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. 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.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a94ec90e-6b82-42b8-a52e-8c6af85a997a%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4006a573-a4e1-46e2-885c-525bcf28ff14%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. 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.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. 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.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/FBCDEBDE-56A3-41F7-8998-8D9E5E993042%40iwebnotes.com.

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