Need help with Item Server Script

Hi,


I have been facing a problem in server script, the problem is that the code in server script checks for the float type fields in a item. Basically it would raise an exception if the float is greater or less than specified numbers. Now I am getting this error 

[18:43:32.846] u’Traceback (innermost last):\n  File “…/lib/webnotes/widgets/form/save.py”, line 36, in savedocs\n    getattr(wrapper, action.lower())()\n  File “…/lib/webnotes/model/bean.py”, line 281, in save\n    self.run_method('validate')\n  File “…/lib/webnotes/model/bean.py”, line 220, in run_method\n    getattr(self.obj, 'custom_' + method)()\n  File “<string>”, line 276, in custom_validate\n  File “<string>”, line 96, in fn_float_check\n  File “…/lib/webnotes/init.py”, line 134, in msgprint\n    raise ValidationError, msg\n ValidationError: Number entered should be less than 1000\n’
ValidationError(u’Number entered should be less than 1000’,)

Now the code I am using is this. The most astonishing thing is that the error is supposed to raise an exception with a message but I am getting this error in the console. Kindly help me out since I am not able to find the error.



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 post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/5I1r0pr1beUJ.

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

 

 

The problem has been fixed, please pull latest updates.

On 26 Apr 2013 18:50, "Aditya Duggal" <ad...@gmail.com> wrote:
Hi,

I have been facing a problem in server script, the problem is that the code in server script checks for the float type fields in a item. Basically it would raise an exception if the float is greater or less than specified numbers. Now I am getting this error

[18:43:32.846] u'Traceback (innermost last):\n File "../lib/webnotes/widgets/form/save.py", line 36, in savedocs\n getattr(wrapper, action.lower())()\n File "../lib/webnotes/model/bean.py", line 281, in save\n self.run_method(\'validate\')\n File "../lib/webnotes/model/bean.py", line 220, in run_method\n getattr(self.obj, \'custom_\' + method)()\n File "<string>", line 276, in custom_validate\n File "<string>", line 96, in fn_float_check\n File "../lib/webnotes/__init__.py", line 134, in msgprint\n raise ValidationError, msg\n ValidationError: Number entered should be less than 1000\n'
ValidationError(u'Number entered should be less than 1000',)

Now the code I am using is this. The most astonishing thing is that the error is supposed to raise an exception with a message but I am getting this error in the console. Kindly help me out since I am not able to find the error.



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 post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/5I1r0pr1beUJ.

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






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 post to this group, send email to er...@googlegroups.com.

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

 

 

Hi Nabin,

I have pulled the latest update and I am unable to understand which problem has been fixed as there a lot of issues which I am tackling at the same time.

I am still getting the validation error or have you fixed the data import problem which also seems not fixed.



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 post to this group, send email to er...@googlegroups.com.

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

 

 

Msgprint problem has been fixed. Please check after clearing cache.

On 26 Apr 2013 19:18, "Aditya Duggal" <ad...@rigpl.com> wrote:
Hi Nabin,

I have pulled the latest update and I am unable to understand which problem has been fixed as there a lot of issues which I am tackling at the same time.

I am still getting the validation error or have you fixed the data import problem which also seems not fixed.



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 post to this group, send email to er…@googlegroups.com.

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






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 post to this group, send email to er...@googlegroups.com.

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

 

 

Thanks, I did not notice that at all. Btw it has resolved most of my issues. Would be preparing for the final assault and then a LONG BLOG on my coding experience in the Items.

On Friday, April 26, 2013 7:23:18 PM UTC+5:30, Nabin Hait wrote:

Msgprint problem has been fixed. Please check after clearing cache.

On 26 Apr 2013 19:18, "Aditya Duggal" <ad...@rigpl.com> wrote:
Hi Nabin,

I have pulled the latest update and I am unable to understand which problem has been fixed as there a lot of issues which I am tackling at the same time.

I am still getting the validation error or have you fixed the data import problem which also seems not fixed.



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 post to this group, send email to erpnext-dev…@googlegroups.com.

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

 

 



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 post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/tWn_9wHOKHgJ.

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