Adding user throws error

29 views
Skip to first unread message

Madhan kumar

unread,
Nov 28, 2012, 12:29:49 AM11/28/12
to erpnext-dev...@googlegroups.com
Hello all,

when i tried to add user i get profile already exist. i have commented the line 117 in profile.py


Cleared App Cache. all-web.js:32
Starting up... all-web.js:694
Traceback (innermost last): File "../lib/webnotes/widgets/form/save.py", line 41, in savedocs getattr(doclist, action.lower())() File "../lib/webnotes/model/wrapper.py", line 242, in save self.run_method('validate') File "../lib/webnotes/model/wrapper.py", line 183, in run_method getattr(self.obj, method)() File "../lib/core/doctype/profile/profile.py", line 52, in validate self.update_roles() File "../lib/core/doctype/profile/profile.py", line 103, in update_roles self.check_one_system_manager() AttributeError: DocType instance has no attribute 'check_one_system_manager' Traceback (innermost last): File "../lib/webnotes/handler.py", line 197, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 234, in execute_cmd ret = method() File "../lib/webnotes/widgets/form/save.py", line 56, in savedocs raise e AttributeError: DocType instance has no attribute 'check_one_system_manager' all-web.js:301
  1. Uncaught TypeError: object is not a function

madhan.

Anand Doshi

unread,
Nov 28, 2012, 2:40:13 AM11/28/12
to erpnext-dev...@googlegroups.com
Hi,

You need to uncomment the function -- "check_one_system_manager".

We had fixed the bug some time back. You don't need to comment it anymore.

If you haven't made any changes to profile.py,
just go to lib folder and run
git checkout core/doctype/profile/profile.py

This will undo all your changes.

Then do lib/wnf.py --update origin master
so that you have the latest files.

Now you should not get the error.

Thanks,
Anand.

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/BKEth5AlTsgJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Madhan Kumar

unread,
Nov 28, 2012, 3:10:50 AM11/28/12
to erpnext-dev...@googlegroups.com
thanks Anand. will check and let you know.
--
Madhan

Madhan Kumar

unread,
Nov 28, 2012, 3:17:49 AM11/28/12
to erpnext-dev...@googlegroups.com
Hi Anand,

i made the changes you said now i get same error with the following console output. im running erpnext on centos 6.2

Traceback (innermost last): File "../lib/webnotes/model/wrapper.py", line 196, in save_main self.doc.save(cint(self.doc.fields.get('__islocal'))) File "../lib/webnotes/model/doc.py", line 419, in save make_autoname, keep_timestamps = keep_timestamps) File "../lib/webnotes/model/doc.py", line 279, in insert self._set_name(autoname, istable) File "../lib/webnotes/model/doc.py", line 210, in _set_name r = webnotes.model.code.run_server_obj(so, 'autoname') File "../lib/webnotes/model/code.py", line 191, in run_server_obj return getattr(server_obj, method_name)() File "../lib/core/doctype/profile/profile.py", line 40, in autoname msgprint("%s is not a valid email id" % self.doc.email) NameError: global name 'msgprint' is not defined Traceback (innermost last): File "../lib/webnotes/widgets/form/save.py", line 41, in savedocs getattr(doclist, action.lower())() File "../lib/webnotes/model/wrapper.py", line 243, in save self.save_main() File "../lib/webnotes/model/wrapper.py", line 204, in save_main raise e NameError: global name 'msgprint' is not defined Traceback (innermost last): File "../lib/webnotes/handler.py", line 198, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 231, in execute_cmd ret = call(method, webnotes.form_dict) File "../lib/webnotes/handler.py", line 249, in call return fn(**newargs) File "../lib/webnotes/widgets/form/save.py", line 56, in savedocs raise e NameError: global name 'msgprint' is not defined
all-web.js (line 301)
TypeError: callback is not a function

Anand Doshi

unread,
Nov 28, 2012, 3:26:55 AM11/28/12
to erpnext-dev...@googlegroups.com
Hi,

Please do:
lib/wnf.py --update origin master

We have fixed this error.

Thanks,
Anand.

Madhan Kumar

unread,
Nov 28, 2012, 5:22:54 AM11/28/12
to erpnext-dev...@googlegroups.com
Thanks will check and let you know..

Madhan.

Madhan Kumar

unread,
Nov 28, 2012, 6:28:23 AM11/28/12
to erpnext-dev...@googlegroups.com
Dear Anand,

thanks. now i am able to add users to system. the problem was that my mail server port is configured to 465 instead of 587. 

Regards,
Madhan


Reply all
Reply to author
Forward
0 new messages