OpenUpgrade: Migrate Database odoo from v11 to v12


Hello my Friends;

I am trying to migrate an odoo database from the version 11 to the version12.

So, i am using OpenUpgrade.

But, the problem is that when i try to launch the process i got this error:

2019-07-26 13:46:36,059 9902 INFO ? odoo: Odoo version 12.0
2019-07-26 13:46:36,060 9902 INFO ? odoo: Using configuration file at /etc/odoo12.conf
2019-07-26 13:46:36,060 9902 INFO ? odoo: addons paths: ['/opt/OpenUpgrade/addons', '/opt/OpenUpgrade/odoo/addons']
2019-07-26 13:46:36,060 9902 INFO ? odoo: database: odoo12@default:default
2019-07-26 13:46:36,109 9902 CRITICAL ? odoo.modules.module: Couldn't load module base
2019-07-26 13:46:36,109 9902 CRITICAL ? odoo.modules.module: module '' has no attribute 'yaml_import'
2019-07-26 13:46:36,110 9902 ERROR ? odoo.service.server: Failed to load server-wide module `base`.
Traceback (most recent call last):
File "/opt/OpenUpgrade/odoo/service/", line 1063, in load_server_wide_modules
File "/opt/OpenUpgrade/odoo/modules/", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/opt/OpenUpgrade/odoo/modules/", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 5, in <module>
File "/opt/OpenUpgrade/odoo/addons/base/models/", line 7, in <module>
from . import ir_model
File "/opt/OpenUpgrade/odoo/addons/base/models/", line 17, in <module>
from openupgradelib import openupgrade
File "/usr/local/lib/python3.6/dist-packages/openupgradelib/", line 84, in <module>
yaml_import = tools.yaml_import
AttributeError: module '' has no attribute 'yaml_import'
2019-07-26 13:46:36,138 9902 INFO database-demo odoo.modules.loading: loading 1 modules...
2019-07-26 13:46:36,147 9902 ERROR database-demo odoo.modules.migration: module base: Each pre-migration file must have a "migrate(cr, installed_version)" function
2019-07-26 13:46:36,150 9902 INFO database-demo odoo.modules.registry: module base: creating or updating database tables
2019-07-26 13:46:36,151 9902 ERROR database-demo odoo.sql_db: bad query: b"\n SELECT c.relname\n FROM pg_class c\n JOIN pg_namespace n ON (n.oid = c.relnamespace)\n WHERE c.relname IN ()\n AND c.relkind IN ('r', 'v', 'm')\n AND n.nspname = 'public'\n "
ERROR: syntax error at or near ")"
LINE 5: WHERE c.relname IN ()

Need your help please.

Thanks a lot in advance.

Best regards.

1 Answer
Best Answer

I had this problem solved it by installing pyyaml==3.13 using pip.

Hope this helps!