ValueError: list.remove(x): x not in list

Asked by picou

Hello, I had a good syncronisation with latest V6 and magento 1.4.2

I deleted on magento side three attributes in the tax table that were not in use. If I try to syncronise from V6 to magento all is ok if I try to import product attributes this is the error below. I have tried to reload referential maping templates and synchronize referential settings with no success. if I go tofolder Attributes and sets > Attributes > tax_class_id In bottom left Attribut Options: I see the the three attributes but can not delete them. Do you know how to refresh this table?
Thanks

This is full error message:

Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : fr_FR.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/addons/magentoerpconnect-v6.zip/magentoerpconnect-v6/magerp_core.py", line 92, in sync_attribs
    self.pool.get('magerp.product_attributes').ext_import(cr, uid, mage_inp, inst.id, defaults={'referential_id':inst.id}, context={'referential_id':inst.id})
  File "/usr/share/pyshared/openerp-server/addons/base_external_referentials.zip/base_external_referentials/external_osv.py", line 201, in ext_import
    if self.oe_update(cr, uid, existing_rec_id, vals, each_row, external_referential_id, defaults, context):
  File "/usr/share/pyshared/openerp-server/addons/base_external_referentials.zip/base_external_referentials/external_osv.py", line 223, in oe_update
    return self.write(cr, uid, existing_rec_id, vals, context)
  File "/usr/share/pyshared/openerp-server/addons/magentoerpconnect-v6.zip/magentoerpconnect-v6/product.py", line 288, in write
    self.pool.get('magerp.product_attribute_options').data_to_save(cr, uid, options_data, update=True, context={'attribute_id': id, 'referential_id': referential_id})
  File "/usr/share/pyshared/openerp-server/addons/magentoerpconnect-v6.zip/magentoerpconnect-v6/product.py", line 428, in data_to_save
    to_remove_ids.remove(existing_ids[0])
ValueError: list.remove(x): x not in list

Question information

Language:
English Edit question
Status:
Solved
For:
Magento OpenERP Connector Edit question
Assignee:
No assignee Edit question
Solved by:
picou
Solved:
Last query:
Last reply:
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) said :
#1

Hello,

I just had this error today.
An attribute on Magento have had the same attribute option twice.
I don't know if you problem have the same origin, but it is worthwhile to check that.

Guewen

Revision history for this message
picou (6-contact-pointpc-net) said :
#2

BINGO !
Thank you Guewen Baconnier @ Camptocamp.
What I thought to be a suppression of tax fields from magento causing a problem in openerp was nothing else than a double entry ( same name ) of my producers attribute.
Thanks for your answer...