Hello Friends,We recently updated the version of bench. after updating teh bench version, we ran the bench update command. Everything was working perfectly fine before updating the bench version. but after updating the bench version and running bench update command, I got this error at the time migrating the site:
Can someone guide us to resolve this error? just for the clarity, we are not using drop box:
We are on self-hosted platform, running erpnext v15 on ubuntu 24.04 server having python3.12.
Migrating trackomatic.in
Updating DocTypes for frappe : [================================ ] 82%
Queued rebuilding of search index for trackomatic.in
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 282, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1454, in get_module
return importlib.import_module(modulename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 995, in exec_module
File “”, line 488, in _call_with_frames_removed
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 7, in
import dropbox
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/dropbox/init.py”, line 3, in
from dropbox.dropbox_client import ( # noqa: F401 # pylint: disable=unused-import
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/dropbox/dropbox_client.py”, line 43, in
from dropbox.session import (
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/dropbox/session.py”, line 1, in
import pkg_resources
ModuleNotFoundError: No module named ‘pkg_resources’
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 114, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 1442, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/core.py”, line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.12/site-packages/click/decorators.py”, line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 694, in migrate
).run(site=site)
^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 193, in run
self.run_schema_updates()
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 54, in wrapper
raise e
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 46, in wrapper
ret = method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 123, in run_schema_updates
frappe.model.sync.sync_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 44, in sync_all
sync_for(app, force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 112, in sync_for
import_file_by_path(
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 146, in import_file_by_path
import_doc(
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 239, in import_doc
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 334, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1177, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1011, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1371, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1353, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1008, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 549, in on_update
self.run_module_method(“on_doctype_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 647, in run_module_method
module = load_doctype_module(self.name, self.module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 286, in load_doctype_module
raise ImportError(msg) from e
ImportError: Module import failed for Dropbox Settings, the DocType you’re trying to open might be deleted.
Error: No module named ‘pkg_resources’