Skip to Content
Menu
This question has been flagged
2 Replies
2507 Views

Please I tried using a dump file to create a new database, and I am getting this error on my odoo Version 14.0. Below is the error Message 

Traceback (most recent call last):  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch    result = request.dispatch()  File "/home/odoo/addons/odoo/odoo/http.py", line 807, in dispatch    r = self._call_function(**self.params)  File "/home/odoo/addons/odoo/odoo/http.py", line 360, in _call_function    return checked_call(self.db, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/service/model.py", line 94, in wrapper    return f(dbname, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/http.py", line 351, in checked_call    result.flatten()  File "/home/odoo/addons/odoo/odoo/http.py", line 1251, in flatten    self.response.append(self.render())  File "/home/odoo/addons/odoo/odoo/http.py", line 1244, in render    return env["ir.ui.view"]._render_template(self.template, self.qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1709, in _render_template    return self.browse(self.get_view_id(template))._render(values, engine)  File "/home/odoo/addons/odoo/addons/website/models/ir_ui_view.py", line 420, in _render    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)  File "/home/odoo/addons/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1717, in _render    return self.env[engine]._render(self.id, qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 258, in _render    self.compile(template, options)(self, body.append, values or {})  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn    raise e  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn    return compiled(self, append, new, options, log)  File "", line 1, in template_web_login_6  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn    raise e  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn    return compiled(self, append, new, options, log)  File "", line 1, in template_web_login_layout_12  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 338, in _compiled_fn    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) Exception The above exception was the direct cause of the following exception: Traceback (most recent call last):  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch    result = request.dispatch()  File "/home/odoo/addons/odoo/odoo/http.py", line 807, in dispatch    r = self._call_function(**self.params)  File "/home/odoo/addons/odoo/odoo/http.py", line 360, in _call_function    return checked_call(self.db, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/service/model.py", line 94, in wrapper    return f(dbname, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/http.py", line 351, in checked_call    result.flatten()  File "/home/odoo/addons/odoo/odoo/http.py", line 1251, in flatten    self.response.append(self.render())  File "/home/odoo/addons/odoo/odoo/http.py", line 1244, in render    return env["ir.ui.view"]._render_template(self.template, self.qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1709, in _render_template    return self.browse(self.get_view_id(template))._render(values, engine)  File "/home/odoo/addons/odoo/addons/website/models/ir_ui_view.py", line 420, in _render    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)  File "/home/odoo/addons/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1717, in _render    return self.env[engine]._render(self.id, qcontext)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 258, in _render    self.compile(template, options)(self, body.append, values or {})  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn    raise e  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn    return compiled(self, append, new, options, log)  File "", line 1, in template_web_login_6  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn    raise e  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn    return compiled(self, append, new, options, log)  File "", line 1, in template_web_login_layout_12  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 338, in _compiled_fn    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) odoo.addons.base.models.qweb.QWebException: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach...                                                             ^ Traceback (most recent call last):  File "/home/odoo/addons/odoo/odoo/tools/cache.py", line 85, in lookup    r = d[key]  File "/home/odoo/addons/odoo/odoo/tools/func.py", line 71, in wrapper    return func(self, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/tools/lru.py", line 34, in __getitem__    a = self.d[obj] KeyError: ('ir.qweb', , 'web.assets_common', 'en_US', True, False, '', False, False, False, (1,)) During handling of the above exception, another exception occurred: Traceback (most recent call last):  File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn    return compiled(self, append, new, options, log)  File "", line 1, in template_web_frontend_layout_101  File "", line 2, in _get_asset_nodes  File "/home/odoo/addons/odoo/odoo/tools/cache.py", line 90, in lookup    value = d[key] = self.method(*args, **kwargs)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_qweb.py", line 297, in _get_asset_nodes    return remains + asset.to_node(css=css, js=js, debug=debug, async_load=async_load, defer_load=defer_load, lazy_load=lazy_load)  File "/home/odoo/addons/odoo/odoo/addons/base/models/assetsbundle.py", line 153, in to_node    css_attachments = self.css() or []  File "/home/odoo/addons/odoo/odoo/addons/base/models/assetsbundle.py", line 346, in css    self.save_attachment("css", css)  File "/home/odoo/addons/odoo/odoo/addons/base/models/assetsbundle.py", line 295, in save_attachment    attachment = ira.with_user(SUPERUSER_ID).create(values)  File "", line 2, in create  File "/home/odoo/addons/odoo/odoo/api.py", line 326, in _model_create_single    return create(self, arg)  File "/home/odoo/addons/odoo/addons/website/models/ir_attachment.py", line 25, in create    return super(Attachment, self).create(vals)  File "", line 2, in create  File "/home/odoo/addons/odoo/odoo/api.py", line 347, in _model_create_multi    return create(self, [arg])  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_attachment.py", line 611, in create    return super(IrAttachment, self).create(vals_list)  File "", line 2, in create  File "/home/odoo/addons/odoo/odoo/api.py", line 348, in _model_create_multi    return create(self, arg)  File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_fields.py", line 534, in create    recs = super().create(vals_list)  File "", line 2, in create  File "/home/odoo/addons/odoo/odoo/api.py", line 348, in _model_create_multi    return create(self, arg)  File "/home/odoo/addons/odoo/odoo/models.py", line 3869, in create    records = self._create(data_list)  File "/home/odoo/addons/odoo/odoo/models.py", line 3975, in _create    cr.execute(query, params)  File "", line 2, in execute  File "/home/odoo/addons/odoo/odoo/sql_db.py", line 101, in check    return f(self, *args, **kwargs)  File "/home/odoo/addons/odoo/odoo/sql_db.py", line 298, in execute    res = self._obj.execute(query, params) psycopg2.ProgrammingError: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach...                                                             ^ Error to render compiling AST ProgrammingError: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach...                                                             ^ Template: web.frontend_layout Path: /t/html/head/t[7] Node:

I do not know where this is coming from or the course of it, I haven't seen it nor backed up using a dump file before.

thanks for your concern,

Waiting in anticipation. 

Avatar
Discard
Best Answer

Hi ,

The issue occurs when you try to restore the backup from a higher version to a lower version.

Remove 'As integer' from dump.sql file and restore it will solve the issue .

 https://github.com/Yenthe666/auto_backup/issues/79#issuecomment-420711666

Hope it Helps,

Kiran 


Avatar
Discard
Author Best Answer

Thank you very much Kiran for your fast response, I have successfully removed the whole "As Integer", but now am getting this error in the Database 

Database restores error: "There is no item named 'dump.sql' in the archive".
Did I also remove the relevant 'As integer'?? 


Thanks a lot, @Kiran

Waiting in anticipation. 

Avatar
Discard


To do this

- Unzip your backup file
- Open dump.sql file and Delete every occurrence of 'AS INTEGER' from every 'CREATE
SEQUENCE'
- Zip the file and do restore

Related Posts Replies Views Activity
6
Apr 16
11474
1
Feb 24
79
2
May 23
5384
1
May 21
3055
2
Mar 19
4363