[solved] Unable to reset user password from user profile in erpnext 10.0.5

I have upgrade Erpnxet to latest release. After this i am unable to update user password from the user profile. please guide.

Below is error trace.

Before pressing save button.

App Versions
{
“erpnext”: “10.0.5”,
“frappe”: “10.0.6”
}
Route
Form/User/sghulam@cf4it.com
Error Report
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 561, in test_password_strength
from frappe.utils.password_strength import test_password_strength as _test_password_strength
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/password_strength.py”, line 6, in
from zxcvbn import zxcvbn
ImportError: cannot import name zxcvbn
Request Data
{
“type”: “POST”,
“args”: {
“new_password”: “Test12345”,
“cmd”: “frappe.core.doctype.user.user.test_password_strength”
},
“url”: “/”
}
Response JSON
{}

After Pressing Save Button.

App Versions
{
“erpnext”: “10.0.5”,
“frappe”: “10.0.6”
}
Route
Form/User/sghulam@cf4it.com
Error Report
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 561, in test_password_strength
from frappe.utils.password_strength import test_password_strength as _test_password_strength
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/password_strength.py”, line 6, in
from zxcvbn import zxcvbn
ImportError: cannot import name zxcvbn
Request Data
{
“type”: “POST”,
“args”: {
“new_password”: “Test12345”,
“cmd”: “frappe.core.doctype.user.user.test_password_strength”
},
“url”: “/”
}
Response JSON
{}

[very important]. Delete your password from this error log. You might have compromised your password and pls change it to a new one.

Hi @gsbaig,
You need to install that package library using pip install zxcvbn

1 Like

Hi Shreya,

Thanks for your support. i run the command and after it the problem is same. do i need some more updates for python or frappe

Please help me

Give this a try,
pip install zxcvbn-python

1 Like

Hi Shreya, Problem is still same do we need NPM or nodejs or python update.

Were the packages installed without any errors?

yes

Requirement already satisfied: zxcvbn-python in /usr/local/lib/python2.7/dist-packages

Requirement already satisfied: zxcvbn in /usr/local/lib/python2.7/dist-packages

I have upgraded it from the old version.

$ pip install <package>
installs to the global directory. We manage packages within the env directory of your bench folder.

You might have to do.

$ ./env/bin/pip install zxcvbn-python

Or best

$ bench setup requirements
Assuming you have zxcvbn-python within your requirements.txt file of your <bench_folder>/apps/frappe folder.

Dear i have done all these requirements and still that error is coming that

ImportError: cannot import name zxcvbn

as i start typing password on user profile. this appears.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 561, in test_password_strength
from frappe.utils.password_strength import test_password_strength as _test_password_strength
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/password_strength.py”, line 6, in
from zxcvbn import zxcvbn
ImportError: cannot import name zxcvbn

Same here. @gsbaig did you find a solution?

I have all the requirements.

@achillesrasquinha

I did
$ ./env/bin/pip install zxcvbn-python in frappe-bench directory.

I’ve also uninstalled zxcvbn-python and zxcvbn with
$ ./env/bin/pip uninstall zxcvbn
and
$ ./env/bin/pip uninstall zxcvbn-python

Then I did
$ bench setup requirements

When I type $ ./env/bin/pip freezeit show
zxcvbn==1.0
zxcvbn-python==4.4.18

Problem not solved.

It did this on ERPNext: v9.2.21 (master), Frappe Framework: v9.2.22 (master) and on ERPNext: v10.0.6 (master), Frappe Framework: v10.0.7 (master)

I tried fresh installation of complete new erpnext and it works. but after the upgrade the live production is having same problem.

Python version?

./env/bin/python --version

Python 2.7.5

we are also facing same issue after upgrade to version 10.0.13. The moment user try write anything in password field this error appears.

Any solution?

Dear this was issue with python library. I have update python and it sole the issue.

i tried but it didnt work. can u please help me the steps

Please share the error message