Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4142 Visualizzazioni

Hi, i try to do an HTTP POST request but I have an error with this line :

sock = socket.create_connection((conn.host, conn.port), conn.timeout, conn.source_address)

Error:

  File "/usr/local/lib/python2.7/dist-packages/odoo-9.0c-py2.7.egg/openerp/addons/Copa/purchase.py", line 191, in sendOrder
sock = socket.create_connection((conn.host, conn.port), conn.timeout, conn.source_address) File "/usr/lib/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): gaierror: [Errno -2] Name or service not known

I have no idea what is the problem, in advance, thanks for help.

Avatar
Abbandona

The problem is that I'm trying to connect me to the host 'connect.company.com/xmlorder-test'


I have done a test with just 'connect.company.com' , it works because there is no error


But I have to connect me to the full url, how can I do this please ?

Autore Risposta migliore

Ok, I just have to connect me to the second part of the URL with 

conn.request("POST","/xmlorder-test",request)

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 17
19017
1
lug 15
21194
2
set 22
5973
0
giu 24
1738
1
set 22
15378