Odoo Help


TypeError: string indices must be integers, not str

on 12/4/13, 1:16 AM 4,822 views

I'm using the prestashop - openerp connector module, but when i try to import data from the website (background jobs) is giving me this error traceback:

 File "/usr/prestaconnect/openerp-connector/connector/queue/worker.py", line 122, in run_job
 File "/usr/prestaconnect/openerp-connector/connector/queue/job.py", line 460, in perform
self.result = self.func(session, *self.args, **self.kwargs)
 File "/usr/prestaconnect/prestashoperpconnect/prestashoperpconnect/unit/import_synchronizer.py", line 663, in       import_batch
  importer.run(filters=filters, **kwargs)
 File "/usr/prestaconnect/prestashoperpconnect/prestashoperpconnect/unit/import_synchronizer.py", line 202, in run
return super(PaymentMethodsImportSynchronizer, self).run(filters, **kwargs)
 File "/usr/prestaconnect/prestashoperpconnect/prestashoperpconnect/unit/import_synchronizer.py", line 176, in run
record_ids = self._run_page(filters)
 File "/usr/prestaconnect/prestashoperpconnect/prestashoperpconnect/unit/import_synchronizer.py", line 186, in _run_page
self._import_record(record_id, **kwargs)
 File "/usr/prestaconnect/prestashoperpconnect/prestashoperpconnect/unit/import_synchronizer.py", line 206, in _import_record
 ('name', '=', record['payment']),
 TypeError: string indices must be integers, not str

In the module code i see this:

class PaymentMethodsImportSynchronizer(BatchImportSynchronizer):
_model_name = 'payment.method'

 def run(self, filters=None, **kwargs):
   if filters is None:
    filters = {}
filters['display'] = '[id,payment]'
   return super(PaymentMethodsImportSynchronizer, self).run(filters, **kwargs)

  def _import_record(self, record):
   ids = self.session.search('payment.method', [
    ('name', '=', record['payment']),
    ('company_id', '=', self.backend_record.company_id.id),
    if ids:
    self.session.create('payment.method', {
    'name': record['payment'],
    'company_id': self.backend_record.company_id.id,

I don't know what actually is happening, i need some lights on this, cause i did not developed this module, and i'm new to prestashop - openerp integration.

I managed to install everything and it does import metadata and base data as well.

Any help would be greatly appreciated, thanks in advance!

On 12/15/13, 11:24 AM


Same error for me.

It appears since they added code in revision 281 on the 2013-11-14 to import payment methods.

You can browse the change in the code here : bazaar.launchpad.net/~prestashoperpconnect-core-editors/prestashoperpconnect/7.0/revision/281 and comment all the changes.


Oh, thank you very much! Just saw your answer! I'll check it out, merci!

on 1/19/14, 4:31 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/4/13, 1:16 AM
Seen: 4822 times
Last updated: 3/16/15, 8:10 AM