Odoo Help

0

Connection refused for import

By
Coralie Cardon
on 12/21/15, 6:06 AM 1,512 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
0
Janarthanan
On 6/22/17, 1:56 AM

Its seems your server is not started so please start the server and check the browser  with http://localhost:8069 if it is  connected and then run the script 

( or)
check with your terminal by 
telnet localhost 8069
 it will return connected to localhost if your server is running 
 else  it will return Connection refused 


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.

Register

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)

Stats

Asked: 12/21/15, 6:06 AM
Seen: 1512 times
Last updated: 6/22/17, 1:56 AM