While change user password, it give error

when i change user password it:

Traceback (most recent call last):
File “/home/erp/erp/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 272, in _save
self.run_before_save_methods()
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 723, in run_before_save_methods
self.run_method(“validate”)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 669, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 863, in composer
return composed(self, method, *args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 846, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 663, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/core/doctype/user/user.py”, line 49, in validate
result = test_password_strength(self.new_password)
File “/home/erp/erp/apps/frappe/frappe/utils/password_strength.py”, line 10, in test_password_strength
result = zxcvbn.password_strength(password, user_inputs)
AttributeError: ‘module’ object has no attribute ‘password_strength’

Traceback (most recent call last):
File “/home/erp/erp/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/erp/erp/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/erp/erp/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erp/erp/apps/frappe/frappe/init.py”, line 879, in call
return fn(*args, **newargs)
File “/home/erp/erp/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 272, in _save
self.run_before_save_methods()
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 723, in run_before_save_methods
self.run_method(“validate”)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 669, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 863, in composer
return composed(self, method, *args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 846, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erp/erp/apps/frappe/frappe/model/document.py”, line 663, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erp/erp/apps/frappe/frappe/core/doctype/user/user.py”, line 49, in validate
result = test_password_strength(self.new_password)
File “/home/erp/erp/apps/frappe/frappe/utils/password_strength.py”, line 10, in test_password_strength
result = zxcvbn.password_strength(password, user_inputs)
AttributeError: ‘module’ object has no attribute ‘password_strength’

please help me…

Please check that both your erpnext and frappe repos are on the same branch or not.

@root13F, thank for your reply, frappe repo or bench-repo?

I meant the branches of the apps erpnext and frappe. Go to apps erpnext and frappe and check their branches. These kind of problems normally arise from a branch mismatch.

@root13F, its in same branch

Taking a clue from this post here:

Check what is the value of Password Policy option in System Settings ? Try turning it off or unchecking it and then change the password.

@root13F,

i can’t fined password policy option in system setting

There should be a field in the section named Security

@root13F,

here also not there

On what branch are you ? Because my apps are on master and I can see that option

same here master,

do i need to update the python version ?

okay try a bench update --patch and see if you can see it or not ?

i have updated still same

what is the versions of your apps erpnext and frappe ?

erpnext 7.0.34
frappe 7.0.30

ohh your versions really behind and I can’t tell you to bench update either because it may cause problems. Dont bench update please.

Now I’m out of ideas.

@root13F, thanks anyway…

1 Like