Bench update --reset error. Mismatch dependency of num2words

Hello All,

I need a help. I get this error:

ims@ubun2:~/fb$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (4.2.0)
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow) (0.44)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 087562f Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 056ecdc Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
From cffi callback <function _verify_callback at 0x7f482bd745f0>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f48294fad70>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f48294fac80>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f48294d60c8>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f48294d6230>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f48294d6398>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) - skipping
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (18.0)
INFO:bench.utils:./env/bin/pip install -q -r /home/ims/erpnext/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
From cffi callback <function _verify_callback at 0x7f3fb47895f0>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f3fb1f0ff50>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f3fb1e520c8>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f3fb1e52230>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f3fb1e52398>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f3fb1e52500>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Could not find a version that satisfies the requirement num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1)) (from versions: )
No matching distribution found for num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1))
Traceback (most recent call last):
  File "/home/ims/.local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/ims/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/ims/erpnext/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
  File "/home/ims/erpnext/bench-repo/bench/commands/update.py", line 76, in _update
    update_requirements(bench_path=bench_path)
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 435, in update_requirements
    install_requirements(pip, req_file)
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 499, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext/requirements.txt

Maybe the requirements.txt for num2words for app frappe and erpnext does not match.
frappe: num2words==0.5.5
erpnext: num2words==0.5.4

Any idea how to solve this?

Many thanks before

Hi, erpnext doesnโ€™t have num2words in requirements.txt

https://github.com/frappe/erpnext/blob/develop/requirements.txt

You can try running git reset --hard in the apps/erpnext directory.

This link may help

Hi, snv,

Thanks for your reply.

Unfortunately, after running git reset --hard in the apps/erpnext directory.
And bench update --reset in bench directory. The problem still exist.

ims@ubun2:~/fb$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
remote: Counting objects: 30, done.
remote: Total 30 (delta 21), reused 21 (delta 21), pack-reused 9
Unpacking objects: 100% (30/30), done.
From https://github.com/frappe/frappe
   2e6a202..ffcc3fc  develop    -> upstream/develop
 * [new branch]      report-builder-hotfix -> upstream/report-builder-hotfix
   651df31..86bd7df  staging    -> upstream/staging
   651df31..86bd7df  staging-fixes -> upstream/staging-fixes
 * [new tag]         v11.0.2    -> v11.0.2
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (4.2.0)
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow) (0.44)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 087562f Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
remote: Counting objects: 56, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 56 (delta 39), reused 39 (delta 39), pack-reused 11
Unpacking objects: 100% (56/56), done.
From https://github.com/frappe/erpnext
   bfc195d..63ebeb4  develop    -> upstream/develop
   4ae3fb7..2b5bce0  staging    -> upstream/staging
   4ae3fb7..2b5bce0  staging-fixes -> upstream/staging-fixes
 * [new branch]      validate-fy-dates-1 -> upstream/validate-fy-dates-1
 * [new tag]         v11.0.2    -> v11.0.2
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 056ecdc Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
From cffi callback <function _verify_callback at 0x7f32c4f0f5f0>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f32c2695d70>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f32c2695c80>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f32c26710c8>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f32c2671230>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pip/
From cffi callback <function _verify_callback at 0x7f32c2671398>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) - skipping
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (18.0)
INFO:bench.utils:./env/bin/pip install -q -r /home/ims/erpnext/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
From cffi callback <function _verify_callback at 0x7f8db910c5f0>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f8db6892f50>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f8db67d50c8>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f8db67d5230>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f8db67d5398>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)

AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/num2words/
From cffi callback <function _verify_callback at 0x7f8db67d5500>:
Traceback (most recent call last):
  File "/home/ims/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Could not find a version that satisfies the requirement num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1)) (from versions: )
No matching distribution found for num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1))
Traceback (most recent call last):
  File "/home/ims/.local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/ims/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/ims/erpnext/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
  File "/home/ims/erpnext/bench-repo/bench/commands/update.py", line 76, in _update
    update_requirements(bench_path=bench_path)
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 435, in update_requirements
    install_requirements(pip, req_file)
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 499, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
  File "/home/ims/erpnext/bench-repo/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext/requirements.txt

The

Could not find a version that satisfies the requirement num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1)) (from versions: )
No matching distribution found for num2words==0.5.4 (from frappe->-r ./apps/erpnext/requirements.txt (line 1))

typed in red colour.

But if I run

ims@ubun2:~/fb$ cat apps/erpnext/requirements.txt
frappe
unidecode
pygithub
googlemaps

There is no num2words. This is strange.

I need to update my ERPNext. Please help! Thank you!

Finally, I found the solution here:

It updates my ERPNext to v10.1.53.

Many thanks for the replies! :smile:

1 Like