2023-11-23 17:36:07,777 9 ERROR…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
2023-11-23 17:36:07,777 9 ERROR dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704 odoo.sql_db: bad query: ALTER TABLE "hr_appraisal" ALTER COLUMN "state" DROP DEFAULT, ALTER COLUMN "state" TYPE int4 USING "state"::int4
ERROR: invalid input syntax for type integer: "cancel" 2023-11-23 17:36:07,793 9 WARNING dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704 odoo.modules.loading: Transient module states were reset 2023-11-23 17:36:07,800 9 ERROR dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704 odoo.modules.registry: Failed to load registry Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/tools/sql.py", line 147, in _convert_column cr.execute(query, log_exceptions=False) File "/home/odoo/src/odoo/odoo/sql_db.py", line 321, in execute res = self._obj.execute(query, params) psycopg2.errors.FeatureNotSupported: cannot alter type of a column used by a view or rule DETAIL: rule _RETURN on view hr_appraisal_report depends on column "state"
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/modules/registry.py", line 90, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File "/home/odoo/src/odoo/odoo/modules/loading.py", line 488, in load_modules processed_modules += load_marked_modules(cr, graph, File "/home/odoo/src/odoo/odoo/modules/loading.py", line 372, in load_marked_modules loaded, processed = load_module_graph( File "/home/odoo/src/odoo/odoo/modules/loading.py", line 208, in load_module_graph registry.init_models(cr, model_names, {'module': package.name}, new_install) File "/home/odoo/src/odoo/odoo/modules/registry.py", line 526, in init_models model._auto_init() File "/home/odoo/src/odoo/odoo/models.py", line 2578, in _auto_init new = field.update_db(self, columns) File "/home/odoo/src/odoo/odoo/fields.py", line 2929, in update_db return super(Many2one, self).update_db(model, columns) File "/home/odoo/src/odoo/odoo/fields.py", line 1006, in update_db self.update_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 2932, in update_db_column super(Many2one, self).update_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 1042, in update_db_column self._convert_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 1046, in _convert_db_column sql.convert_column(model._cr, model._table, self.name, self.column_type[1]) File "/home/odoo/src/odoo/odoo/tools/sql.py", line 128, in convert_column _convert_column(cr, tablename, columnname, columntype, using) File "/home/odoo/src/odoo/odoo/tools/sql.py", line 150, in _convert_column cr.execute(query) File "/home/odoo/src/odoo/odoo/sql_db.py", line 321, in execute res = self._obj.execute(query, params) psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type integer: "cancel" 2023-11-23 17:36:07,803 9 CRITICAL dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704 odoo.service.server: Failed to initialize database dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704. Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/tools/sql.py", line 147, in _convert_column cr.execute(query, log_exceptions=False) File "/home/odoo/src/odoo/odoo/sql_db.py", line 321, in execute res = self._obj.execute(query, params) psycopg2.errors.FeatureNotSupported: cannot alter type of a column used by a view or rule DETAIL: rule _RETURN on view hr_appraisal_report depends on column "state"
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/service/server.py", line 1299, in preload_registries registry = Registry.new(dbname, update_module=update_module) File "", line 2, in new File "/home/odoo/src/odoo/odoo/tools/func.py", line 87, in locked return func(inst, *args, **kwargs) File "/home/odoo/src/odoo/odoo/modules/registry.py", line 90, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File "/home/odoo/src/odoo/odoo/modules/loading.py", line 488, in load_modules processed_modules += load_marked_modules(cr, graph, File "/home/odoo/src/odoo/odoo/modules/loading.py", line 372, in load_marked_modules loaded, processed = load_module_graph( File "/home/odoo/src/odoo/odoo/modules/loading.py", line 208, in load_module_graph registry.init_models(cr, model_names, {'module': package.name}, new_install) File "/home/odoo/src/odoo/odoo/modules/registry.py", line 526, in init_models model._auto_init() File "/home/odoo/src/odoo/odoo/models.py", line 2578, in _auto_init new = field.update_db(self, columns) File "/home/odoo/src/odoo/odoo/fields.py", line 2929, in update_db return super(Many2one, self).update_db(model, columns) File "/home/odoo/src/odoo/odoo/fields.py", line 1006, in update_db self.update_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 2932, in update_db_column super(Many2one, self).update_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 1042, in update_db_column self._convert_db_column(model, column) File "/home/odoo/src/odoo/odoo/fields.py", line 1046, in _convert_db_column sql.convert_column(model._cr, model._table, self.name, self.column_type[1]) File "/home/odoo/src/odoo/odoo/tools/sql.py", line 128, in convert_column _convert_column(cr, tablename, columnname, columntype, using) File "/home/odoo/src/odoo/odoo/tools/sql.py", line 150, in _convert_column cr.execute(query) File "/home/odoo/src/odoo/odoo/sql_db.py", line 321, in execute res = self._obj.execute(query, params) psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type integer: "cancel" 2023-11-23 17:36:07,806 9 INFO dibonltd-dibon-internal-app-bt-survey-ajax-upload-f-10616704 What is the error here
This error message is related to Odoo, an open-source enterprise resource planning (ERP) software. The error occurs during the database initialization process, specifically when trying to alter the type of a column used by a view or rule.
Here's a breakdown of the error message:
To resolve this error, you may need to modify the view or rule that is dependent on the "state" column, or you may need to alter the column in a different way that does not conflict with the view or rule. It's also possible that there is a problem with the data in the "state" column, which is causing the SQL query to fail. In this case, you may need to clean up the data in the column before attempting to alter it.