← Back to team overview

credativ team mailing list archive

[Bug 1347696] Re: Migration v7->v8 fails with demodata (product data is the culprit?)

 

Hi,

You're trying to migrate from 7.0 to 8.0. The project is now host on Github, and if you're running the code from launchpad, it's not up to date. 
Plz use this repository https://github.com/OpenUpgrade/OpenUpgrade/tree/8.0 and if you find some errors, report a bug on github.

Thanks for using OpenUpgrade.

Regards.


** Changed in: openupgrade-server
       Status: New => Invalid

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

Title:
  Migration v7->v8 fails with demodata (product data is the culprit?)

Status in OpenUpgrade Server:
  Invalid

Bug description:
  
  Version7 demodata migration seems to fail. See below the log for details.  

  Same thing happens on several different v7 installations  and we
  decided to test this with demodata to see if it applies to all
  migrations.

  Perhaps this has something to do with product variables features?  Can
  you comment on this?


  ---------- migration.log ---------------

  
  Error context:
  View `res.users.groups`
  [view_id: 159, xml_id: base.user_groups_view, model: res.users, parent_id: 156]
  2014-07-23 12:42:47,862 8688 INFO demo_v7_migrated OpenUpgrade: base: post-migration script called with version 7.0.1.3
  2014-07-23 12:43:02,155 8688 INFO demo_v7_migrated OpenUpgrade: Selecting autoinstallable modules web_kanban_gauge
  2014-07-23 12:43:11,093 8688 INFO demo_v7_migrated OpenUpgrade: analytic: post-migration script called with version 7.0.1.1
  2014-07-23 12:43:12,090 8688 INFO demo_v7_migrated OpenUpgrade: email_template: pre-migration script called with version 7.0.1.1
  2014-07-23 12:43:12,091 8688 INFO demo_v7_migrated OpenUpgrade: table email_template, column email_recipients: renaming to partner_to
  2014-07-23 12:43:14,954 8688 INFO demo_v7_migrated OpenUpgrade: product: pre-migration script called with version 7.0.1.1
  2014-07-23 12:43:14,959 8688 INFO demo_v7_migrated OpenUpgrade: table product_supplierinfo, column product_id: renaming to openupgrade_legacy_8_0_product_id
  2014-07-23 12:43:14,962 8688 INFO demo_v7_migrated OpenUpgrade: table product_packaging, column height: renaming to openupgrade_legacy_8_0_height
  2014-07-23 12:43:14,964 8688 INFO demo_v7_migrated OpenUpgrade: table product_packaging, column length: renaming to openupgrade_legacy_8_0_length
  2014-07-23 12:43:14,965 8688 INFO demo_v7_migrated OpenUpgrade: table product_packaging, column weight_ul: renaming to openupgrade_legacy_8_0_weight_ul
  2014-07-23 12:43:14,967 8688 INFO demo_v7_migrated OpenUpgrade: table product_packaging, column width: renaming to openupgrade_legacy_8_0_width
  2014-07-23 12:43:14,975 8688 INFO demo_v7_migrated OpenUpgrade: table product_product, column color: renaming to openupgrade_legacy_8_0_color
  2014-07-23 12:43:14,977 8688 INFO demo_v7_migrated OpenUpgrade: table product_product, column image: renaming to image_variant
  2014-07-23 12:43:14,979 8688 INFO demo_v7_migrated OpenUpgrade: table product_product, column variants: renaming to openupgrade_legacy_8_0_variants
  2014-07-23 12:43:14,980 8688 INFO demo_v7_migrated OpenUpgrade: table product_product, column price_extra: renaming to openupgrade_legacy_8_0_price_extra
  2014-07-23 12:43:14,982 8688 INFO demo_v7_migrated OpenUpgrade: table product_template, column produce_delay: renaming to openupgrade_legacy_8_0_produce_delay
  2014-07-23 12:43:14,984 8688 INFO demo_v7_migrated OpenUpgrade: table product_template, column cost_method: renaming to openupgrade_legacy_8_0_cost_method
  2014-07-23 12:43:14,985 8688 INFO demo_v7_migrated OpenUpgrade: table product_template, column standard_price: renaming to openupgrade_legacy_8_0_standard_price
  2014-07-23 12:43:20,051 8688 INFO demo_v7_migrated OpenUpgrade: product: post-migration script called with version 7.0.1.1
  2014-07-23 12:43:20,060 8688 DEBUG demo_v7_migrated OpenUpgrade: Running  UPDATE product_template as new_table SET color=(    SELECT old_table.openupgrade_legacy_8_0_color    FROM product_product as old_table    WHERE old_table.product_tmpl_id=new_table.id    LIMIT 1)  WHERE id in (43, 8, 11, 16, 39, 3, 47, 14, 46, 48, 17, 28, 36, 15, 4, 30, 50, 33, 40, 19, 23, 31, 35, 20, 44, 37, 34, 25, 32, 1, 10, 26, 42, 18, 13, 49, 22, 9, 24, 45, 27, 38, 6, 29, 2, 21, 41, 7)
  2014-07-23 12:43:20,060 8688 DEBUG demo_v7_migrated OpenUpgrade: 48 rows affected
  2014-07-23 12:43:20,062 8688 DEBUG demo_v7_migrated OpenUpgrade: Running  UPDATE product_template SET color=0 WHERE id = 12
  2014-07-23 12:43:20,062 8688 DEBUG demo_v7_migrated OpenUpgrade: 1 rows affected
  2014-07-23 12:43:20,063 8688 DEBUG demo_v7_migrated OpenUpgrade: Running  UPDATE product_template SET color=None WHERE id = 5
  2014-07-23 12:43:20,064 8688 DEBUG demo_v7_migrated OpenUpgrade: 1 rows affected
  2014-07-23 12:43:21,075 8688 ERROR demo_v7_migrated OpenUpgrade: product: error in migration script /var/tmp/openupgrade/8.0/addons/product/migrations/8.0.1.1/post-migration.py: 'NoneType' object has no attribute '__getitem__'
  2014-07-23 12:43:21,076 8688 ERROR demo_v7_migrated OpenUpgrade: 'NoneType' object has no attribute '__getitem__'
  Traceback (most recent call last):
    File "/var/tmp/openupgrade/8.0/server/openerp/openupgrade/openupgrade.py", line 579, in wrapped_function
      func(cr, version)
    File "/var/tmp/openupgrade/8.0/addons/product/migrations/8.0.1.1/post-migration.py", line 148, in migrate
      quick_request=False, binary_field=True)
    File "/var/tmp/openupgrade/8.0/server/openerp/openupgrade/openupgrade.py", line 690, in move_field_m2o
      vals = [str(x[0][:]) for x in cr.fetchall()]
  TypeError: 'NoneType' object has no attribute '__getitem__'
  2014-07-23 12:43:21,110 8688 ERROR demo_v7_migrated openerp.modules.loading: Error executing post migration script for module product
  `-> procurement
  : 'NoneType' object has no attribute '__getitem__'
  2014-07-23 12:43:21,124 8688 CRITICAL demo_v7_migrated openerp.service.server: Failed to initialize database `demo_v7_migrated`.
  Traceback (most recent call last):
    File "/var/tmp/openupgrade/8.0/server/openerp/service/server.py", line 894, in preload_registries
      registry = RegistryManager.new(dbname, update_module=update_module)
    File "/var/tmp/openupgrade/8.0/server/openerp/modules/registry.py", line 299, 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 369, in load_modules
      force, status, report, loaded_modules, update_module, upg_registry)
    File "/var/tmp/openupgrade/8.0/server/openerp/modules/loading.py", line 276, in load_marked_modules
      loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks, upg_registry=upg_registry)
    File "/var/tmp/openupgrade/8.0/server/openerp/modules/loading.py", line 205, in load_module_graph
      migrations.migrate_module(package, 'post')
    File "/var/tmp/openupgrade/8.0/server/openerp/modules/migration.py", line 179, in migrate_module
      mod.migrate(self.cr, pkg.installed_version)
    File "/var/tmp/openupgrade/8.0/server/openerp/openupgrade/openupgrade.py", line 579, in wrapped_function
      func(cr, version)
    File "/var/tmp/openupgrade/8.0/addons/product/migrations/8.0.1.1/post-migration.py", line 148, in migrate
      quick_request=False, binary_field=True)
    File "/var/tmp/openupgrade/8.0/server/openerp/openupgrade/openupgrade.py", line 690, in move_field_m2o
      vals = [str(x[0][:]) for x in cr.fetchall()]
  TypeError: 'NoneType' object has no attribute '__getitem__'

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


References