Data-migration-tool: Error on Migration

Created on 6 Oct 2017  路  7Comments  路  Source: magento/data-migration-tool

Hi,

I've set the migration going on my Magento 2.2.0 store with the 2.2.0 version of the module installed but it gets past "sales_flat_order_item" and then stops and gives this error "Notice: Array to string conversion in /vendor/magento/data-migration-tool/src/Migration/ResourceModel/Adapter/Mysql.php on line 169" .

Can anyone help with this please?

Most helpful comment

It would be best to report it as a separate issue. The issue is that some serialized data is broken. Please run the tool with -vvv option to see which table causes the issue. After you can add ignoreBrokenData option to that table like

            <transform>
                <field>sales_flat_shipment.packages</field>
                <handler class="\Migration\Handler\SerializeToJson">
                    <param name="ignoreBrokenData" value="true"/>
                </handler>
            </transform>

All 7 comments

Hi @annagreen-juicymedia ,

Perhaps $bind is multi-dimensional array
It would be good if you put var_dump($bind) and var_dump($insertSql) right before $statement and show here. If it is not tool big.
Also you can run migration with -vvv param to see backtrace

Thanks for the link! Will try this now.

@annagreen-juicymedia

Here is the fix for Notice: Array to string conversion https://github.com/magento-panda/data-migration-tool/commit/1d3226c833be529c288ffa951658577669855541
It will be included into the next release

i have the same problem and i got it fix by 1d3226c (thank you Victor), now i past the 84% in [stage: data migration][step: Map Step] and other error showing up in 97%.
`[2017-10-12 14:05:40][INFO][mode: data][stage: data migration][step: Map Step]: started
97% [===========================>] Remaining Time: 30 secs

[Exception]
Notice: unserialize(): Error at offset 156 of 227 bytes in /home/titest/public_html/vendor/magento/data-migration-tool/src/Migration/Handler/SerializeToJson.php on line 37
`

i did try twice and my data is 5000 product with 100,000 orders.

It would be best to report it as a separate issue. The issue is that some serialized data is broken. Please run the tool with -vvv option to see which table causes the issue. After you can add ignoreBrokenData option to that table like

            <transform>
                <field>sales_flat_shipment.packages</field>
                <handler class="\Migration\Handler\SerializeToJson">
                    <param name="ignoreBrokenData" value="true"/>
                </handler>
            </transform>

Its work! (-vvv) help me a lot as will show the status of each table.
i run
( php bin/magento migrate:data -r -vvv /home/XXXXX/public_html/vendor/magento/data-migration tool/etc/opensource-to-opensource/1.9.3.0/config.xml.dist)
i see it stop at widget_instance table.

and i ignore it in the map (map.xml.dist)

         <ignore>
            <document>widget</document>
        </ignore>
         <ignore>
            <document>widget_*</document>
        </ignore>

Now Migration completed for me for the first time after one week work :)

thank you Victor

Was this page helpful?
0 / 5 - 0 ratings