"No backend servers available" using httplib

B

Bruno Desthuilliers

Henrik Lied a écrit :
Hi there!

I'm using a recipe found on ASPN [1] to upload some data to an
external server.

The request fails, and all I get in response is "No backend servers
available".

So I'm wondering: Is this a known exception-message in httplib,

If it was, you should have a full traceback then.
or
could it be an error in the requested external resource?

[1]: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306

From the recipe's code and the message, looks like you're connecting to
(or via) a proxy which fails to relay to the real server.
 
H

Henrik Lied

Henrik Lied a écrit :
Hi there!
I'm using a recipe found on ASPN [1] to upload some data to an
external server.
The request fails, and all I get in response is "No backend servers
available".
So I'm wondering: Is this a known exception-message in httplib,

If it was, you should have a full traceback then.
or
could it be an error in the requested external resource?
[1]:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306

From the recipe's code and the message, looks like you're connecting to
(or via) a proxy which fails to relay to the real server.

Hello Bruno,

The actual reason was quite a bit simpler: The receiving server
required a certain keyword to be first in the request - which I was
not aware of. So now it works - but it's not perfect:

Is there a way to stream the file content over the connection? The way
it works now, the whole file is loaded into memory, right?
 
D

Diez B. Roggisch

Henrik said:
Henrik Lied a écrit :
Hi there!
I'm using a recipe found on ASPN [1] to upload some data to an
external server.
The request fails, and all I get in response is "No backend servers
available".
So I'm wondering: Is this a known exception-message in httplib,

If it was, you should have a full traceback then.
or
could it be an error in the requested external resource?
[1]:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306

From the recipe's code and the message, looks like you're connecting to
(or via) a proxy which fails to relay to the real server.

Hello Bruno,

The actual reason was quite a bit simpler: The receiving server
required a certain keyword to be first in the request - which I was
not aware of. So now it works - but it's not perfect:

Is there a way to stream the file content over the connection? The way
it works now, the whole file is loaded into memory, right?

It appears not, as the httplib uses sendall on the underlying socket.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top