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?

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/", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/addons/", line 92, in sync_attribs
    self.pool.get('magerp.product_attributes').ext_import(cr, uid, mage_inp,, defaults={'referential_id'}, context={'referential_id'})
  File "/usr/share/pyshared/openerp-server/addons/", 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/", line 223, in oe_update
    return self.write(cr, uid, existing_rec_id, vals, context)
  File "/usr/share/pyshared/openerp-server/addons/", 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/", line 428, in data_to_save
ValueError: list.remove(x): x not in list

Question information

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


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.


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

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...