On 03/11/12 03:29, han zheng wrote:
> Thank you, just as you said, I wrote some python code like this(test.py):
> ----------------------------------------------------------------------------
> ......
> if __name__ == "__main__":
>     c = client.Client("/home/nick/.tahoe")
>     uploader = c.getServiceNamed("uploader")
>     uploadable = FileName("/home/nick/test.tar.gz",None)
>     d = uploader.upload(uploadable)
>     d.addCallback(printSuccess)
>     d.addErrback(printError)
>  
>     reactor.callLater(10,reactor.stop)
>     reactor.run()
> ----------------------------------------------------------------------------
>  
> When I ran "python test.py"(the file located in "/home/nick/.tahoe"), there 
> was an Failure
> instance like this: "client gave us zero servers"

The problem I think is that this code isn't waiting for a connection to the 
servers to
be established. That can sometimes take a minute or more. If requests are 
performed too
early they can fail as described in 
<https://tahoe-lafs.org/trac/tahoe-lafs/ticket/719>.

This is part of the reason why we use a gateway. If every command had to 
establish a
connection to all servers, the per-command overhead would be *much* higher.

-- 
David-Sarah Hopwood ⚥

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tahoe-dev mailing list
[email protected]
https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev

Reply via email to