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

After fresh upgrade from 7.0 to Odoo: "Skipping database as its base version is not 8.0.1.3" #156

Closed
ViktorNova opened this issue Dec 11, 2014 · 4 comments

Comments

@ViktorNova
Copy link

I just upgraded from 7.0 to 8 and am now getting an Internal Server Error and in the Odoo log I see many instances of "Skipping database MYDB as its base version is not 8.0.1.3"

The instructions in the readme don't say anything about upgrading/migrating, so I'll recap what my interpretation of them were:

  1. Stop openerp service
  2. Upgraded the database using the migration script, as described here https://doc.therp.nl/openupgrade/migrate.py.html (after the upgrade completed, I got some errors about modules not being found. I assumed that's cause I haven't upgraded to Odoo yet)
  3. Following the readme, I did and apt-get upgrade, then changed 7.0 nightly to 8.0 nightly in my sources.list. Then I installed odoo through the package manager, which removed openerp. So far so good
  4. Odoo didn't see any databases, so I replaced the new odoo init script with the now old OpenERP init script,changing user to "odoo" and pointing it to my old OpenERP config (did not see a migrated one anywhere, and the fresh Odoo one was too empty). I also took out my custom module directories from the config and changed the username to "odoo". The service started fine
  5. Back to the web interface, I am asked to select from MYDB or MYDB_migrated. I select the migrated one, and instantly get the 500 internal server error

Did I do something wrong?

@ViktorNova ViktorNova changed the title After fresh upgrade to Odoo: "Skipping database as its base version is not 8.0.1.3" After fresh upgrade from 7.0 to Odoo: "Skipping database as its base version is not 8.0.1.3" Dec 11, 2014
@pedrobaeza
Copy link
Member

It seems that the migration hasn't been completed or even started, but we need to see the full log of the migration for knowing which is the reason.

@ViktorNova
Copy link
Author

Oh, interesting. I restored from a container backup to do a fresh attempt, only this time I upgraded to Odoo through the package manager first, and this time I got no errors on the console output of migration script, but am getting the same error when I try to start Odoo with the migrated(?) database. Here is the whole migration log:

cat /var/tmp/openupgrade/migration.log 
2014-12-12 01:44:25,697 24913 INFO ? openerp: OpenERP version 8.0
2014-12-12 01:44:25,697 24913 INFO ? openerp: addons paths: ['/home/it/.local/share/Odoo/addons/8.0', u'/var/tmp/openupgrade/8.0/server/openerp/addons', u'/var/tmp/openupgrade/8.0/addons']
2014-12-12 01:44:25,697 24913 INFO ? openerp: database hostname: localhost
2014-12-12 01:44:25,697 24913 INFO ? openerp: database port: 5432
2014-12-12 01:44:25,697 24913 INFO ? openerp: database user: openerp
2014-12-12 01:44:25,913 24913 INFO MYCOMPANY_migrated openerp.modules.loading: loading 1 modules...
2014-12-12 01:44:25,917 24913 ERROR MYCOMPANY_migrated openerp.modules.migration: module base: Unable to load pre-migration file base/migrations/8.0.1.3/pre-migration.py
Traceback (most recent call last):
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/migration.py", line 167, in migrate_module
    mod = imp.load_module(name, fp, pathname, ('.py', 'r', imp.PY_SOURCE))
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/base/migrations/8.0.1.3/pre-migration.py", line 24, in <module>
    from openerp.addons.openupgrade_records.lib import apriori
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/module.py", line 77, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/__init__.py", line 1, in <module>
    import model
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/model/__init__.py", line 2, in <module>
    import comparison_config
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/model/comparison_config.py", line 26, in <module>
    import openerplib
ImportError: No module named openerplib
2014-12-12 01:44:25,917 24913 CRITICAL MYCOMPANY_migrated openerp.service.server: Failed to initialize database `MYCOMPANY_migrated`.
Traceback (most recent call last):
  File "/var/tmp/openupgrade/8.0/server/openerp/service/server.py", line 901, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/registry.py", line 324, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/loading.py", line 337, in load_modules
    loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report, upg_registry=upg_registry)
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/loading.py", line 162, in load_module_graph
    migrations.migrate_module(package, 'pre')
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/migration.py", line 167, in migrate_module
    mod = imp.load_module(name, fp, pathname, ('.py', 'r', imp.PY_SOURCE))
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/base/migrations/8.0.1.3/pre-migration.py", line 24, in <module>
    from openerp.addons.openupgrade_records.lib import apriori
  File "/var/tmp/openupgrade/8.0/server/openerp/modules/module.py", line 77, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/__init__.py", line 1, in <module>
    import model
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/model/__init__.py", line 2, in <module>
    import comparison_config
  File "/var/tmp/openupgrade/8.0/server/openerp/addons/openupgrade_records/model/comparison_config.py", line 26, in <module>
    import openerplib
ImportError: No module named openerplib
2014-12-12 01:44:25,918 24913 INFO MYCOMPANY_migrated openerp.service.server: Initiating shutdown
2014-12-12 01:44:25,918 24913 INFO MYCOMPANY_migrated openerp.service.server: Hit CTRL-C again or send a second signal to force the shutdown.

Is OpenERP supposed to be upgraded to Odoo before or after the database migration?

@ViktorNova
Copy link
Author

It appears my problem all boils down to the error
ImportError: No module named openerplib

I am going to start a new issue and close this one as it seems like the first error I got is pretty much generic for a failed db upgrade.

@eugen-don
Copy link
Member

For those who end up with the same error - heres the solution:

install the python module openerp-client-lib (1.1.2) with this command:

apt-get install python-pip
pip install openerp-client-lib

GuillemCForgeFlow pushed a commit to ForgeFlow/OpenUpgrade that referenced this issue Oct 10, 2024
Signed-off-by pedrobaeza
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

3 participants