Odoo Help


Script Import Error odoo v9

Coralie Cardon
on 2/15/16, 4:00 AM 1,093 views


Itry to Import with a script my partner, 

I have a traceback but i don't know why ! 

It's for Odoo V9 

This is my traceback : 

Traceback (most recent call last):

File "societe.py", line 206, in <module>

comp=sock.execute(dbname, uid,pwd, 'res.partner','create', data)

File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__

return self.__send(self.__name, args)

File "/usr/lib/python2.7/xmlrpclib.py", line 1591, in __request


File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request

return self.single_request(host, handler, request_body, verbose)

File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request

return self.parse_response(response)

File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response

return u.close()

File "/usr/lib/python2.7/xmlrpclib.py", line 794, in close

raise Fault(**self._stack[0])


my code : 

username = "admin"

pwd = "admin"

dbname = "data"

comp = 0

sock_common = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/common")

uid = sock_common.login(dbname, username, pwd)

print "uid>>>>>>>>>>",uid

sock = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/object")

reader = csv.reader(open('partner.csv','rb'),delimiter=';')

print "readderr",reader

x = 1


the end :

comp=sock.execute(dbname, uid,pwd, 'res.partner','create', data)

Thanks for your help ! 

can you try with sock.execute_kw method... and xmlrpc/2/xxx insteand of xmlrpc/xxx ? If it doesn't work, can you upload your simplified script and a simplified csv.

Jérémy Kersten (jke)
on 2/15/16, 4:09 AM

What is this method ? Can you show me plz ? Thanks

BHC SPRL, Coralie Cardon
on 2/15/16, 4:18 AM

Just replace your execute by execute_kw keeping same args! And Just replace thé rpc version in server proxy.

Jérémy Kersten (jke)
on 2/15/16, 12: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: 2/15/16, 4:00 AM
Seen: 1093 times
Last updated: 2/15/16, 4:04 AM