ERPNext Ver 12 Update Error - tabE Invoice User' doesn't exist"

Hi,

I’m running an update on ver 12 ERPNext and I get this error.

Any way to overcome this error?

Thanks

Jay

mmpy3@strategi-erpnext-001:~/frappe-bench$ bench update --reset
Backing up sites…
/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography import x509
INFO:bench.app:pulling frappe
$ git fetch --all
Fetching upstream
$ git reset --hard upstream/version-12
HEAD is now at bb608ca Merge branch ‘v12-pre-release’ into version-12
$ find . -name “.pyc" -delete
INFO:bench.app:pulling erpnext
$ git fetch --all
Fetching upstream
$ git reset --hard upstream/version-12
HEAD is now at b95b4e8 fix: merge conflict
$ find . -name "
.pyc” -delete
INFO:bench.app:pulling biometric_attendance
$ git fetch --all
Fetching upstream
$ git reset --hard upstream/master
HEAD is now at 7b77509 Report checkin and checkout added
$ find . -name “*.pyc” -delete
Updating Python libraries…
$ /home/mmpy3/frappe-bench/env/bin/pip install -q -U pip
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
INFO:bench.app:installing frappe
$ /home/mmpy3/frappe-bench/env/bin/pip install -q -U -e /home/mmpy3/frappe-bench/apps/frappe
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement cryptography==3.3.2 (from frappe)
ERROR: No matching distribution found for cryptography==3.3.2
INFO:bench.app:installing erpnext
$ /home/mmpy3/frappe-bench/env/bin/pip install -q -U -e /home/mmpy3/frappe-bench/apps/erpnext
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
INFO:bench.app:installing biometric_attendance
$ /home/mmpy3/frappe-bench/env/bin/pip install -q -U -e /home/mmpy3/frappe-bench/apps/biometric_attendance
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Updating node packages…
$ yarn install
yarn install v1.22.4
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.89s.
$ yarn install
yarn install v1.22.4
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.11s.
Patching sites…
/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography import x509
Migrating site1.local
Executing erpnext.patches.v12_0.add_company_link_to_einvoice_settings in site1.local (_1bd3e0294da19198)
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 99, in
main()
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/commands/init.py”, line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/commands/site.py”, line 286, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/migrate.py”, line 48, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/mmpy3/frappe-bench/apps/erpnext/erpnext/patches/v12_0/add_company_link_to_einvoice_settings.py”, line 6, in execute
if not company or not frappe.db.count(‘E Invoice User’):
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/database/database.py”, line 814, in count
from tab%s"“” % (dt,))[0][0]
File “/home/mmpy3/frappe-bench/apps/frappe/frappe/database/database.py”, line 171, in sql
self._cursor.execute(query)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/mmpy3/frappe-bench/env/lib/python3.5/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, “Table ‘_1bd3e0294da19198.tabE Invoice User’ doesn’t exist”)

Hi,

It may help to say what the operating environment is, and whether this has been updated successfully in the past or if this is the first time an update has been attempted.

I am getting the same error when tried to update ver12.

any help is appreciated…

bench --site your_site console
frappe.reload_doc('regional', 'doctype', 'e invoice user')
frappe.db.commit()

then run

bench --site your_site migrate
8 Likes

That worked like a charm.

Thanks much!

Jay

Hi everybody! I’m on the following version :
ERPNext: v12.10.1 (version-12)
Frappe Framework: v12.8.1 (version-12)

I’m getting same error when trying to update to v13

I tried the above solution i.e.
bench --site your_site console
frappe.reload_doc(‘regional’, ‘doctype’, ‘e invoice user’)

But I’m getting this error :
In [1]: frappe.reload_doc(‘regional’, ‘doctype’, ‘e invoice user’)
/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/doctype/e_invoice_user/e_invoice_user.json missing
What could be going wrong ?
Can anyone help?

1 Like

@Suresh_Thakor thanks for this quick fix… !!!

Do you think we should create a issue for this since lots of users are facing this while updating the Erpnext12.

Let me know your opinion.

@Nikunj_Patel, Yes. there is lots of user still using old version. definitely they will face when upgrade. You can create issue.

Thanks.

Done issue created :

3 Likes

I am facing the same issue