Getting an error while creating a new site in ERPnext V14 on Ubuntu 22.04 LTS

I’m encountering an issue while attempting to create a new site in ERPNext V14 on Ubuntu 22.04 LTS.I’m using Frappe v14.21.0 and Erpnext v14.11.1.

bench new-site site1.local

Traceback (most recent call last):
  File "/home/erpuser/.pyenv/versions/3.10.9/lib/python3.10/", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/erpuser/.pyenv/versions/3.10.9/lib/python3.10/", line 86, in _run_code
    exec(code, run_globals)
  File "/home/erpuser/dev-bench/apps/frappe/frappe/utils/", line 109, in <module>
  File "/home/erpuser/dev-bench/apps/frappe/frappe/utils/", line 18, in main
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpuser/dev-bench/env/lib/python3.10/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erpuser/dev-bench/apps/frappe/frappe/commands/", line 74, in new_site
  File "/home/erpuser/dev-bench/apps/frappe/frappe/", line 80, in _new_site
  File "/home/erpuser/dev-bench/apps/frappe/frappe/", line 156, in install_db
    setup_database(force, source_sql, verbose, no_mariadb_socket)
  File "/home/erpuser/dev-bench/apps/frappe/frappe/database/", line 20, in setup_database
    return frappe.database.mariadb.setup_db.setup_database(
  File "/home/erpuser/dev-bench/apps/frappe/frappe/database/mariadb/", line 41, in setup_database
    if force or (db_name not in dbman.get_database_list()):
  File "/home/erpuser/dev-bench/apps/frappe/frappe/database/", line 49, in get_database_list
    return self.db.sql("SHOW DATABASES", pluck=True)
  File "/home/erpuser/dev-bench/apps/frappe/frappe/database/", line 260, in sql
    self.log_query(query, values, debug, explain)
  File "/home/erpuser/dev-bench/apps/frappe/frappe/database/mariadb/", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?

We have our custom application on the Frappe Framework. and We need this specific that (Frappe v14.21.0 & Erpnext v14.11.1) version for our application.

Can anyone help me out in this

Why don’t you follow the docker installation process here:

try this…
Uninstall the custom app, then create the new site, and then reinstall the custom app

Hi @trentmu , I already tried to setup with this method, but that didn’t work for me.
When I installed specific versions of both frappe v14.21.0 and erpnext v14.11.1, I got this error.