OpenUpgrade mailing list archives

openupgrade@odoo-community.org

Avatar

[10.0 -> 11.0] Error while load module `odoo/addons/base/migrations/11.0.1.3/pre-migration.py`

by
Sébastien Gendre
- 06/08/2020 18:52:08
While running a migration from Odoo 10.0 -> 11.0, with OpenUpgrade 11.0, I
got an error:


```
ERROR migration_db odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
  File "/OpenUpgrade/odoo/modules/registry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/OpenUpgrade/odoo/modules/loading.py", line 385, in load_modules
    report=report, models_to_check=models_to_check, upg_registry=upg_registry)
  File "/OpenUpgrade/odoo/modules/loading.py", line 151, in load_module_graph
    migrations.migrate_module(package, 'pre')
  File "/OpenUpgrade/odoo/modules/migration.py", line 191, in migrate_module
    mod = load_script(pyfile, name)
  File "/OpenUpgrade/odoo/modules/migration.py", line 38, in load_script
    return imp.load_module(module_name, fp, fname, ('.py', 'r', imp.PY_SOURCE))
ValueError: load_module arg#2 should be a file or None
2020-08-06 15:44:00,148 66 CRITICAL migration_db odoo.service.server: Failed to initialize database `migration_db`.
Traceback (most recent call last):
  File "/OpenUpgrade/odoo/service/server.py", line 1043, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/OpenUpgrade/odoo/modules/registry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/OpenUpgrade/odoo/modules/loading.py", line 385, in load_modules
    report=report, models_to_check=models_to_check, upg_registry=upg_registry)
  File "/OpenUpgrade/odoo/modules/loading.py", line 151, in load_module_graph
    migrations.migrate_module(package, 'pre')
  File "/OpenUpgrade/odoo/modules/migration.py", line 191, in migrate_module
    mod = load_script(pyfile, name)
  File "/OpenUpgrade/odoo/modules/migration.py", line 38, in load_script
    return imp.load_module(module_name, fp, fname, ('.py', 'r', imp.PY_SOURCE))
ValueError: load_module arg#2 should be a file or None

```

If I inspect with GDB, I can see that the fp variable is type
_io.TextIOWrapper.

Any idea?

Thanks for your help,