frappe / chat

Modern Chat App for Frappe
Other
103 stars 124 forks source link

Installation error "pymysql.err.ProgrammingError: (1146, "Table '_8743f315d5a0b184.tabChat Room' doesn't exist") #71

Open HUMENTH opened 9 months ago

HUMENTH commented 9 months ago

I get an error when I try to install "Frappe Chat" on a new ERPNext instance. It says "pymysql.err.ProgrammingError: (1146, "Table '_8743f315d5a0b184.tabChat Room' doesn't exist")". If I uninstall and reinstall the "Frappe Chat" app, the error goes away.

Version

Frappe version :- 15.0.0-dev(version-15-beta) ERPNext version :- 15.0.0-dev(version-15-beta) Chat :- 0.0.1(main)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Installing chat...
An error occurred while installing chat: (1146, "Table '_8743f315d5a0b184.tabChat Room' doesn't exist")
Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 462, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 306, in install_app
    frappe.get_attr(after_install)()
  File "apps/chat/chat/patches/migrate_chat_data.py", line 10, in execute
    migrate_rooms()
  File "apps/chat/chat/patches/migrate_chat_data.py", line 16, in migrate_rooms
    'Chat Room').select('*').run(as_dict=True)
                             ^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/database.py", line 217, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 153, in execute
    result = self._query(query)
             ^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 322, in _query
    conn.query(q)
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 558, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 822, in _read_query_result
    result.read()
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 1200, in read
    first_packet = self.connection._read_packet()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 772, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.11/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.11/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table '_8743f315d5a0b184.tabChat Room' doesn't exist")
zilurrane commented 8 months ago

I am also facing same error. Any help?

HUMENTH commented 8 months ago

@zilurrane uninstall app then run bench migrate and re-install app.