Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The web form table crashes while installing frappe #1

Closed
njsubedi opened this issue Aug 9, 2022 · 0 comments
Closed

The web form table crashes while installing frappe #1

njsubedi opened this issue Aug 9, 2022 · 0 comments

Comments

@njsubedi
Copy link
Owner

njsubedi commented Aug 9, 2022

Right after creating new site, running bench install-app erpnext or bench install-app payments throws the following error.

If we dig into the database with show tables, the table name called tabweb form is shown in the list of tables.

But if we try describe 'tabweb form' mariadb reports that no such table exists in engine.

Mariadb runtime error log says [ERROR] InnoDB: Table 'cloudron.tabweb form' is corrupted. Please drop the table and recreate.

Frappe throws the following errors:

$ bench use cloudron.local
$ bench install-app erpnext

Installing erpnext...
Updating DocTypes for erpnext       : [================                        ] 40%
An error occurred while installing erpnext: (1932, "Table 'cloudron.tabweb form' doesn't exist in engine")
Traceback (most recent call last):
  File "/app/code/frappe-bench/apps/frappe/frappe/commands/site.py", line 413, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "/app/code/frappe-bench/apps/frappe/frappe/installer.py", line 289, in install_app
    sync_for(name, force=force, reset_permissions=True)
  File "/app/code/frappe-bench/apps/frappe/frappe/model/sync.py", line 80, in sync_for
    import_file_by_path(
  File "/app/code/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 124, in import_file_by_path
    db_modified_timestamp = frappe.db.get_value(doc["doctype"], doc["name"], "modified")
  File "/app/code/frappe-bench/apps/frappe/frappe/database/database.py", line 468, in get_value
    result = self.get_values(
  File "/app/code/frappe-bench/apps/frappe/frappe/database/database.py", line 566, in get_values
    out = self._get_values_from_table(
  File "/app/code/frappe-bench/apps/frappe/frappe/database/database.py", line 801, in _get_values_from_table
    r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
  File "/app/code/frappe-bench/apps/frappe/frappe/database/database.py", line 209, in sql
    self._cursor.execute(query, values)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
    result = self._query(query)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
    conn.query(q)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_query_result
    result.read()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 1156, in read
    first_packet = self.connection._read_packet()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1932, "Table 'cloudron.tabweb form' doesn't exist in engine")

root@282bf56a9cac:/app/code/frappe-bench# /usr/local/bin/gosu cloudron:cloudron bench install-app erpnext
root@282bf56a9cac:/app/code/frappe-bench# /usr/local/bin/gosu cloudron:cloudron bench install-app erpnext

$ bench install-app erpnext

Installing payments...
Updating DocTypes for payments      : [========================================] 100%

* Installing Payment Custom Fields in Web Form

An error occurred while installing payments: (1932, "Table 'cloudron.tabweb form' doesn't exist in engine")
Traceback (most recent call last):

  File "/app/code/frappe-bench/apps/frappe/frappe/commands/site.py", line 413, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "/app/code/frappe-bench/apps/frappe/frappe/installer.py", line 299, in install_app
    frappe.get_attr(after_install)()
  File "/app/code/frappe-bench/apps/payments/payments/utils/utils.py", line 59, in make_custom_fields
    create_custom_fields(
  File "/app/code/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 190, in create_custom_fields
    create_custom_field(doctype, df, ignore_validate=ignore_validate)
  File "/app/code/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 163, in create_custom_field
    custom_field.insert()
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 280, in insert
    self.run_post_save_methods()
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 1090, in run_post_save_methods
    self.run_method("on_update")
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 927, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 1271, in composer
    return composed(self, method, *args, **kwargs)
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 1253, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/app/code/frappe-bench/apps/frappe/frappe/model/document.py", line 924, in fn
    return method_object(*args, **kwargs)
  File "/app/code/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 94, in on_update
    frappe.db.updatedb(self.dt)
  File "/app/code/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 365, in updatedb
    db_table.sync()
  File "/app/code/frappe-bench/apps/frappe/frappe/database/schema.py", line 44, in sync
    self.alter()
  File "/app/code/frappe-bench/apps/frappe/frappe/database/mariadb/schema.py", line 148, in alter
    raise e
  File "/app/code/frappe-bench/apps/frappe/frappe/database/mariadb/schema.py", line 132, in alter
    frappe.db.sql(query)
  File "/app/code/frappe-bench/apps/frappe/frappe/database/database.py", line 209, in sql
    self._cursor.execute(query, values)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
    result = self._query(query)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
    conn.query(q)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_query_result
    result.read()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 1156, in read
    first_packet = self.connection._read_packet()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/app/code/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1932, "Table 'cloudron.tabweb form' doesn't exist in engine")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant