Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v11 to v12: CRITICAL migration odoo.modules.module: Couldn't load module auth_crypt #2142

Closed
mfr69bs opened this issue Dec 22, 2019 · 12 comments

Comments

@mfr69bs
Copy link

mfr69bs commented Dec 22, 2019

Hello everybody,

there is an error when upgrading from version 11 to 12 that I cannot resolve. I would appreciate a hint.

Impacted versions:
v12

Steps to reproduce:
Do a migration

Current behavior:
Upgrade process stops

2019-12-22 16:56:10,651 904 CRITICAL migration odoo.modules.module: Couldn't load module auth_crypt 
2019-12-22 16:56:10,652 904 CRITICAL migration odoo.modules.module: No module named 'odoo.addons.base.res' 
2019-12-22 16:56:10,657 904 WARNING migration odoo.modules.loading: Transient module states were reset 
2019-12-22 16:56:10,659 904 ERROR migration odoo.modules.registry: Failed to load registry 
Traceback (most recent call last):
  File "/home/administrator/OpenUpgrade/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 476, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 360, in load_marked_modules
    upg_registry=upg_registry,
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 196, in load_module_graph
    load_openerp_module(package.name)
  File "/home/administrator/OpenUpgrade/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "/home/administrator/OpenUpgrade/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 3, in <module>
  File "/usr/lib/python3/dist-packages/odoo/addons/auth_crypt/models/__init__.py", line 3, in <module>
    from . import res_users
  File "/usr/lib/python3/dist-packages/odoo/addons/auth_crypt/models/res_users.py", line 9, in <module>
    from odoo.addons.base.res import res_users
ModuleNotFoundError: No module named 'odoo.addons.base.res'
2019-12-22 16:56:10,666 904 CRITICAL migration odoo.service.server: Failed to initialize database `migration`. 
Traceback (most recent call last):
  File "/home/administrator/OpenUpgrade/odoo/service/server.py", line 1126, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/home/administrator/OpenUpgrade/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 476, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 360, in load_marked_modules
    upg_registry=upg_registry,
  File "/home/administrator/OpenUpgrade/odoo/modules/loading.py", line 196, in load_module_graph
    load_openerp_module(package.name)
  File "/home/administrator/OpenUpgrade/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "/home/administrator/OpenUpgrade/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 3, in <module>
  File "/usr/lib/python3/dist-packages/odoo/addons/auth_crypt/models/__init__.py", line 3, in <module>
    from . import res_users
  File "/usr/lib/python3/dist-packages/odoo/addons/auth_crypt/models/res_users.py", line 9, in <module>
    from odoo.addons.base.res import res_users
ModuleNotFoundError: No module named 'odoo.addons.base.res'
2019-12-22 16:56:10,669 904 INFO migration odoo.service.server: Initiating shutdown 
2019-12-22 16:56:10,669 904 INFO migration odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
@pedrobaeza
Copy link
Member

You have an incorrect environment for migrating. I can't say more as it depends on the way you do it.

@mfr69bs
Copy link
Author

mfr69bs commented Dec 23, 2019

Thank you for your answer. Even if I find this form of help somewhat surprising.

Since the migration goes through almost completely and only stumbles with the "auth_crypt" module, I assume that the environment is correct.

Maybe someone might show me a way that works. Maybe even you, @pedrobaeza . You gave the hint about the environment and closed the ticket immediately.

"My way" is like this:
https://agipme.fr/2019/09/odoo-11-ce-migration-en-v12.html

@pedrobaeza
Copy link
Member

Sorry, but this issue tracker is for reporting problems with the migration scripts, which is not the case, so we can't help you and that's why I close it. Try asking on that reference

@mfr69bs
Copy link
Author

mfr69bs commented Dec 23, 2019

@pedrobaeza, why are you so dismissive?

If there is no problem with the migration script, although the error message is generated by the script, I would appreciate a reason why the other modules are then migrated cleanly.

@dupski
Copy link

dupski commented Dec 23, 2019

@mfr69bs it looks like you have a copy of Odoo installed at /usr/lib/python3/dist-packages/odoo which might be interfearing with the update. Try moving / removing that temporarily and trying again.

@pedrobaeza is right, GitHub issues are not a support forum. Where is the best place to ask questions about OpenUpgrade and other OCA stuff? IRC?

@mfr69bs
Copy link
Author

mfr69bs commented Dec 23, 2019

You made my day, @dupski . Thank you for your help and that you have broken "the rules"! ;)

I wish you a Merry Christmas and a Happy New Year.

@marcos-mendez
Copy link

Sorry, but this issue tracker is for reporting problems with the migration scripts, which is not the case, so we can't help you and that's why I close it. Try asking on that reference

Pedro, i know you are a legend on the community, but this openupgrade has a pretty shit documentation it doens't have tutorial's. I've been working with odoo for the last 5 years and this is the first google search result with the keywords No module named 'odoo.addons.base.res'

I asked a lot of people about this and im sure that the only good answer here is from @dupski

For my point of view it is an ISSUE and yes it must be addressed to the github because de Odoo community doesn't have an organized documentation for new comers, and also the ODOO S.A Forum is horrible, no one answers and this is the first page result for the error.

This Issue must be addressed to a new place, forum, support community or whatever until it has the CLOSED status. Just closing tickets without checking the origin of the problem is like keep pumping air to a leaking tire. It doesn't make sense

@marcos-mendez
Copy link

@mfr69bs it looks like you have a copy of Odoo installed at /usr/lib/python3/dist-packages/odoo which might be interfearing with the update. Try moving / removing that temporarily and trying again.

@dupski i don't have a installation conflict, mine has everything ina virtualenv

2020-05-27 05:52:27,621 530190 INFO eva odoo.addons.base.models.ir_module: ALLOW access to module.button_upgrade on ['crm', 'project', 'mail', 'website', 'analytic', 'auth_oauth', 'auth_signup', 'base', 'base_import', 'base_setup', 'bus', 'calendar_sms', 'contacts', 'decimal_precision', 'fetchmail', 'google_account', 'google_calendar', 'google_drive', 'iap', 'mail_debrand', 'product', 'resource', 'sales_team', 'sms', 'utm', 'web', 'web_diagram', 'web_editor', 'web_kanban_gauge', 'web_settings_dashboard', 'website_mail', 'website_odoo_debranding', 'website_theme_install', 'web_tour', 'calendar', 'theme_bootswatch', 'portal', 'http_routing'] to user evacomvc@gmail.com #1 via n/a
2020-05-27 05:52:27,622 530190 INFO eva odoo.addons.base.models.ir_module: ALLOW access to module.update_list on ['crm', 'project', 'mail', 'website', 'analytic', 'auth_oauth', 'auth_signup', 'base', 'base_import', 'base_setup', 'bus', 'calendar_sms', 'contacts', 'decimal_precision', 'fetchmail', 'google_account', 'google_calendar', 'google_drive', 'iap', 'mail_debrand', 'product', 'resource', 'sales_team', 'sms', 'utm', 'web', 'web_diagram', 'web_editor', 'web_kanban_gauge', 'web_settings_dashboard', 'website_mail', 'website_odoo_debranding', 'website_theme_install', 'web_tour', 'calendar', 'theme_bootswatch', 'portal', 'http_routing'] to user evacomvc@gmail.com #1 via n/a
2020-05-27 05:52:27,989 530190 INFO eva odoo.models: Actual recompute of field ir.module.module.menus_by_module for 38 recs.
2020-05-27 05:52:28,191 530190 INFO eva odoo.addons.base.models.ir_module: ALLOW access to module.button_install on ['web_planner', 'web_planner', 'web_planner', 'web_planner'] to user evacomvc@gmail.com #1 via n/a
2020-05-27 05:52:28,195 530190 INFO eva odoo.models: Actual recompute of field ir.module.module.menus_by_module for 1 recs.
2020-05-27 05:52:28,274 530190 INFO eva OpenUpgrade: Selecting autoinstallable modules partner_autocomplete,web_unsplash,snailmail,auth_crypt
2020-05-27 05:52:28,281 530190 WARNING eva odoo.modules.graph: module mail_debrand: not installable, skipped
2020-05-27 05:52:28,286 530190 WARNING eva odoo.modules.graph: module website_odoo_debranding: not installable, skipped
2020-05-27 05:52:28,321 530190 INFO eva odoo.modules.loading: loading 41 modules...
2020-05-27 05:52:28,346 530190 CRITICAL eva odoo.modules.module: Couldn't load module auth_crypt
2020-05-27 05:52:28,346 530190 CRITICAL eva odoo.modules.module: No module named 'odoo.addons.base.res'
2020-05-27 05:52:28,348 530190 WARNING eva odoo.modules.loading: Transient module states were reset
2020-05-27 05:52:28,348 530190 ERROR eva odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 478, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 361, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 196, in load_module_graph
load_openerp_module(package.name)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/module.py", line 368, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.dict)
File "", line 3, in
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/addons/auth_crypt/models/init.py", line 3, in
from . import res_users
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/addons/auth_crypt/models/res_users.py", line 9, in
from odoo.addons.base.res import res_users
ModuleNotFoundError: No module named 'odoo.addons.base.res'
2020-05-27 05:52:28,350 530190 CRITICAL eva odoo.service.server: Failed to initialize database eva.
Traceback (most recent call last):
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/service/server.py", line 1151, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 478, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 361, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/loading.py", line 196, in load_module_graph
load_openerp_module(package.name)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/module.py", line 368, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.dict)
File "", line 3, in
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/addons/auth_crypt/models/init.py", line 3, in
from . import res_users
File "/home/mendez/Projects/Odoo/v11/upgradev12/OpenUpgrade/addons/auth_crypt/models/res_users.py", line 9, in
from odoo.addons.base.res import res_users
ModuleNotFoundError: No module named 'odoo.addons.base.res'

I don't understand this behaviour because it has worked with other files in the server.

Preatty weird

@pedrobaeza
Copy link
Member

I have asked for having a mailing list or a forum specific for OpenUpgrade, but still this issue tracker is not for that and I hope you understand it. Any way, as the issue is closed, you can continue the conversation here if you want.

@pedrobaeza
Copy link
Member

Here you have the newly created mailing list for asking this kind of questions:

https://odoo-community.org/groups/openupgrade-87

@marcos-mendez
Copy link

marcos-mendez commented May 27, 2020 via email

@pedrobaeza
Copy link
Member

Please subscribe to the list and let's move all the questions to it and hope people collaborate in their answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants