Odoo Help

Welcome!

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

0

Connection refused for import

By
Coralie Cardon
on 12/21/15, 6:06 AM 839 views

Hello, 

I did a script to import data. I can't access because the connection is refused. 

Look my error : 

Traceback (most recent call last):

File "account.py", line 33, in <module>

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

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

verbose=self.__verbose

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 1301, in single_request

self.send_content(h, request_body)

File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content

connection.endheaders(request_body)

File "/usr/lib/python2.7/httplib.py", line 997, in endheaders

self._send_output(message_body)

File "/usr/lib/python2.7/httplib.py", line 850, in _send_output

self.send(msg)

File "/usr/lib/python2.7/httplib.py", line 812, in send

self.connect()

File "/usr/lib/python2.7/httplib.py", line 793, in connect

self.timeout, self.source_address)

File "/usr/lib/python2.7/socket.py", line 571, in create_connection

raise err

socket.error: [Errno 111] Connection refused



Thanks



Script : 

import re

import sys, os

import xmlrpclib

import csv

username = "admin"

pwd = "admin"

dbname = "full"

 comp =0

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

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

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

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

x = 1 

post your script to help you get fixed

Axel Mendoza
on 12/21/15, 6:01 PM

import xmlrpclib import csv import re import sys, os username = "admin" pwd = "admin" dbname = "full" comp=0 # pour tester la connexion faudra enlever ce champ sock_common = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/common") uid = sock_common.login(dbname, username, pwd) sock = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/object") reader = csv.reader(open('Contacts.csv','rb'),delimiter=';') x = 1

BHC SPRL, Coralie Cardon
on 12/22/15, 2:18 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/21/15, 6:06 AM
Seen: 839 times
Last updated: 12/22/15, 2:19 AM