Help

-1

OpenUpgrade 9.0 -> 10.0: How to solve website/migrations: ImportError: cannot import name convert_html_fragment ?

Avatar
Ermin Trevisan

I'm trying to upgrade a database from Odoo 9.0 to 10.0 using OpenUpgrade. When it calls the website pre-migration, I get the following error and need help:

2019-09-23 19:02:07,769 20293 ERROR flohmarkt-zug odoo.modules.migration: module website: Unable to load pre-migration file website/migrations/10.0.1.0/pre-migration.py
Traceback (most recent call last):
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/migration.py", line 166, in migrate_module
mod = imp.load_module(name, fp, pathname, ('.py', 'r', imp.PY_SOURCE))
File "/openupgrade/10/OpenUpgrade-10.0/addons/website/migrations/10.0.1.0/pre-migration.py", line 7, in <module>
from openupgradelib.openupgrade_tools import (
ImportError: cannot import name convert_html_fragment
2019-09-23 19:02:07,773 20293 WARNING flohmarkt-zug odoo.modules.loading: Transient module states were reset
2019-09-23 19:02:07,775 20293 ERROR flohmarkt-zug odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/registry.py", line 83, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 441, in load_modules
force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 326, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check, upg_registry=upg_registry
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 146, in load_module_graph
migrations.migrate_module(package, 'pre')
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/migration.py", line 166, in migrate_module
mod = imp.load_module(name, fp, pathname, ('.py', 'r', imp.PY_SOURCE))
File "/openupgrade/10/OpenUpgrade-10.0/addons/website/migrations/10.0.1.0/pre-migration.py", line 7, in <module>
from openupgradelib.openupgrade_tools import (
ImportError: cannot import name convert_html_fragment
2019-09-23 19:02:07,776 20293 CRITICAL flohmarkt-zug odoo.service.server: Failed to initialize database `flohmarkt-zug`.
Traceback (most recent call last):
File "/openupgrade/10/OpenUpgrade-10.0/odoo/service/server.py", line 974, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/registry.py", line 83, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 441, in load_modules
force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 326, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check, upg_registry=upg_registry
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/loading.py", line 146, in load_module_graph
migrations.migrate_module(package, 'pre')
File "/openupgrade/10/OpenUpgrade-10.0/odoo/modules/migration.py", line 166, in migrate_module
mod = imp.load_module(name, fp, pathname, ('.py', 'r', imp.PY_SOURCE))
File "/openupgrade/10/OpenUpgrade-10.0/addons/website/migrations/10.0.1.0/pre-migration.py", line 7, in <module>
from openupgradelib.openupgrade_tools import (
ImportError: cannot import name convert_html_fragment


Thank you in advance

Avatar
Abaikan
1 Jawaban
0
Best Answer

You should install openupgradelib 3.0.0

2 Komentar
Avatar
Abaikan
Avatar
Omar OUHARI
-

Same here.

There is non openupgradelib 3.0.0 version.

The latest version is 2.0.0

Is there any way to fixe this error ?

Avatar
Christophe Combelles
-

You can install version 3.0.0 from github (clone the repository then `python setup.py install` from inside it)