← Back to team overview

credativ team mailing list archive

[Bug 1325530] Re: "Invalid syntax" error in ./addons/account_analytic_plans/migrations/7.0.1.0/pre-migration.py

 

Thanks for the report! Pedro's fix based on your patch was merged just
now.

** Changed in: openupgrade-addons/7.0
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of
OpenUpgrade Committers, which is subscribed to OpenUpgrade Addons.
https://bugs.launchpad.net/bugs/1325530

Title:
  "Invalid syntax" error in
  ./addons/account_analytic_plans/migrations/7.0.1.0/pre-migration.py

Status in OpenUpgrade Addons:
  Fix Released
Status in OpenUpgrade Addons 7.0 series:
  Fix Released

Bug description:
  When upgrading OpenERP 6.1 to 7.0, I got this error:

  2014-06-02 09:16:20,768 2202 ERROR cyssea_migrated openerp: Failed to initialize database `cyssea_migrated`.
  Traceback (most recent call last):
    File "/var/tmp/openupgrade/7.0/server/openerp/cli/server.py", line 98, in preload_registry
      db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module)
    File "/var/tmp/openupgrade/7.0/server/openerp/pooler.py", line 33, in get_db_and_pool
      registry = RegistryManager.get(db_name, force_demo, status, update_module)
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/registry.py", line 192, in get
      update_module)
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/registry.py", line 218, in new
      openerp.modules.load_modules(registry.db, force_demo, status, update_module)
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/loading.py", line 378, in load_modules
      processed_upgrade = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module, registry)
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/loading.py", line 285, in load_marked_modules
      loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_
  checks, registry=registry)
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/loading.py", line 172, in load_module_graph
      migrations.migrate_module(package, 'pre')
    File "/var/tmp/openupgrade/7.0/server/openerp/modules/migration.py", line 184, in migrate_module
      mod = imp.load_source(name, pyfile, fp2)
    File "account_analytic_plans/migrations/7.0.1.0/pre-migration.py", line 39
      logged_query(cr, ("""
                 ^
  SyntaxError: invalid syntax

  In addons/account_analytic_plans/migrations/7.0.1.0/pre-migration.py,
  the two function call arguments are not properly enclosed into
  brackets. Addind a closing bracket to the end of line 37 and 44 of the
  file solved the problem.

  You can see the patch attached

To manage notifications about this bug go to:
https://bugs.launchpad.net/openupgrade-addons/+bug/1325530/+subscriptions


References