Initial import in Pending Status

Bug #1306010 reported by David
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento
Incomplete
Undecided
Unassigned

Bug Description

I have migrated from openerp 6.1 to 7.

To do it, i have used openupgrade, but to do the migration i had been to uninstall the magentoerpconnect before the migration. After the migration have done, I have installed the connector for version 7, with all dependencies.

I can synchronize the initial metadata without problems, but i'm unable to sincronize any other thing. The job appear in Pendig status and in the worker, there are no job related.

At the first moment, some jobs go to Fail status, for example:

Triying to import groups

Traceback (most recent call last):
  File "/opt/OPENERP7/openerp-connector70/connector/queue/worker.py", line 122, in run_job
    job.perform(session)
  File "/opt/OPENERP7/openerp-connector70/connector/queue/job.py", line 472, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/unit/import_synchronizer.py", line 332, in import_record
    importer.run(magento_id, force=force)
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/unit/import_synchronizer.py", line 181, in run
    self._import_dependencies()
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/partner.py", line 272, in _import_dependencies
    if binder.to_openerp(record['group_id']) is None:
KeyError: 'group_id'

Triying to import product categories:

Task openerp.addons.magentoerpconnect.unit.import_synchronizer.import_batch('magento.product.category', 1, filters={'from_date': datetime.datetime(2014, 4, 10, 10, 49, 7)})

and the error:

Traceback (most recent call last):
  File "/opt/OPENERP7/openerp-connector70/connector/queue/worker.py", line 122, in run_job
    job.perform(session)
  File "/opt/OPENERP7/openerp-connector70/connector/queue/job.py", line 472, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/unit/import_synchronizer.py", line 324, in import_batch
    importer.run(filters=filters)
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/product_category.py", line 179, in run
    tree = self.backend_adapter.tree()
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/product_category.py", line 142, in tree
    [parent_id, storeview_id])
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/product_category.py", line 93, in _call
    return super(ProductCategoryAdapter, self)._call(method, arguments)
  File "/opt/OPENERP7/openerp-connector-magento70/magentoerpconnect/unit/backend_adapter.py", line 129, in _call
    result = api.call(method, arguments)
  File "/usr/local/lib/python2.7/dist-packages/magento/api.py", line 161, in call
    return self.client.call(self.session, resource_path, arguments)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
    raise Fault(**self._stack[0])
Fault: <Fault 1: 'Internal Error. Please see log for details.'>

branch
http://bazaar.launchpad.net/~openerp-connector-core-editors/openerp-connector-magento/7.0/

revision
966 <email address hidden>

How can I debug what are the problem? and, it's posible to delete all jobs in list?

Thanks

David (dhecar)
description: updated
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

What is your PHP version? Is it PHP 5.4 and if yes, did you installed the compatibility patch for Magento?What is your PHP version? Is it PHP 5.4 and if yes, did you installed the compatibility patch for Magento?

Changed in openerp-connector-magento:
importance: Undecided → Critical
status: New → Incomplete
importance: Critical → Undecided
importance: Undecided → High
importance: High → Undecided
Revision history for this message
David (dhecar) wrote :

Hello Again.

I'm triying to connect openerp 7 with magento 1.9, with php 5.5.15.

The pach for magento is applied in this version.

In the firts moment i can't sync the categories, by that i have changed the backend_adapter.py with the patch:

 def _call(self, method, arguments):
        try:
            custom_url = self.magento.use_custom_api_path
            with magentolib.API(self.magento.location,
                                self.magento.username,
                                self.magento.password,
                                full_url=custom_url) as api:
                # If magento is used with PHP version >= 5.4, then we have to remove all
                # trailing None values

                if isinstance(arguments, list) and len(arguments) > 0 and arguments[-1] is None:
                    arguments = [a for a in arguments if a is not None]

                result = api.call(method, arguments)

Now I'm triying to import products, but I'm getting another error:

Traceback (most recent call last):
  File "/opt/odoo/custom/addons/magento/openerp-connector7/connector/queue/worker.py", line 122, in run_job
    job.perform(session)
  File "/opt/odoo/custom/addons/magento/openerp-connector7/connector/queue/job.py", line 485, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/opt/odoo/custom/addons/magento/openerp-connector-magento/magentoerpconnect/unit/import_synchronizer.py", line 369, in import_batch
    importer.run(filters=filters)
  File "/opt/odoo/custom/addons/magento/openerp-connector-magento/magentoerpconnect/product.py", line 258, in run
    to_date=to_date)
  File "/opt/odoo/custom/addons/magento/openerp-connector-magento/magentoerpconnect/product.py", line 213, in search
    [filters] if filters else [{}])]
  File "/opt/odoo/custom/addons/magento/openerp-connector-magento/magentoerpconnect/product.py", line 186, in _call
    return super(ProductProductAdapter, self)._call(method, arguments)
  File "/opt/odoo/custom/addons/magento/openerp-connector-magento/magentoerpconnect/unit/backend_adapter.py", line 166, in _call

  File "/usr/local/lib/python2.7/dist-packages/magento/api.py", line 161, in call
    return self.client.call(self.session, resource_path, arguments)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1467, in parse_response
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: junk after document element: line 2, column 0

Whats the best option? Change the php version to 5.3 or 5.4 with applied patch, or is this error caused for other thing??

Thanks to much

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.