Return-Path: X-Original-To: apmail-libcloud-users-archive@minotaur.apache.org Delivered-To: apmail-libcloud-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 574D09819 for ; Tue, 11 Oct 2011 17:40:30 +0000 (UTC) Received: (qmail 7461 invoked by uid 500); 11 Oct 2011 17:40:30 -0000 Delivered-To: apmail-libcloud-users-archive@libcloud.apache.org Received: (qmail 7430 invoked by uid 500); 11 Oct 2011 17:40:30 -0000 Mailing-List: contact users-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@libcloud.apache.org Delivered-To: mailing list users@libcloud.apache.org Received: (qmail 7422 invoked by uid 99); 11 Oct 2011 17:40:30 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 17:40:30 +0000 Received: from localhost (HELO mail-qw0-f45.google.com) (127.0.0.1) (smtp-auth username tomaz, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 17:40:30 +0000 Received: by qadb10 with SMTP id b10so7264534qad.18 for ; Tue, 11 Oct 2011 10:40:28 -0700 (PDT) Received: by 10.68.34.69 with SMTP id x5mr47478149pbi.92.1318354828119; Tue, 11 Oct 2011 10:40:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.229.18 with HTTP; Tue, 11 Oct 2011 10:40:08 -0700 (PDT) In-Reply-To: <4E947A88.6030605@arcode.com> References: <4E947A88.6030605@arcode.com> From: =?ISO-8859-2?Q?Toma=BE_Muraus?= Date: Tue, 11 Oct 2011 19:40:08 +0200 Message-ID: Subject: Re: httplib error when using Rackspace cloudfiles driver To: users@libcloud.apache.org Content-Type: multipart/alternative; boundary=bcaec520e5a737cdb404af0967b6 --bcaec520e5a737cdb404af0967b6 Content-Type: text/plain; charset=ISO-8859-1 Hi, Which version of libcloud are you using (0.5.2, trunk?). It would also be very useful if you can run your script with LIBCLOUD_DEBUG=/dev/stdout environment variable set - LIBCLOUD_DEBUG=/dev/stdout python my_script.py. This should log all the requests and hopefully the offending header which is making it fail. P.S. I think calling str() on the 'value' in common/base.py:L385 would fix it, but I'm still interested where the 'long' value is coming from (probably it's a content-length or something like that). Thanks, Tomaz On Tue, Oct 11, 2011 at 7:19 PM, Simon Smith wrote: > I'm getting an httplib.py error when trying to upload a file, see python > session below. Note that 'test2' is a previously-created container. I > looked at the code and it isn't obvious what is going on. I can go add > debugging code but first wanted to see if anyone else had run into this. > (Note: I have not had any problems using libcloud to create new Rackspace > computing nodes). > > Thanks - Simon > > >>> from libcloud.storage.types import Provider > >>> from libcloud.storage.providers import get_driver > >>> CloudFiles = get_driver(Provider.**CLOUDFILES_US) > >>> driver = CloudFiles('','<**redacted>') > /var/www/html/ops/resources/**python/libcloud/httplib_ssl.** > pyc/qqPIGI8-vn-gxQ_**YSAuiF22D8YyOdnxVQ8LYN4UQEbk:**55: UserWarning: SSL > certificate verification is disabled, this can pose a security risk. For > more information how to enable the SSL certificate verification, please > visit the libcloud documentation. > >>> cont = driver.get_container('test2') > >>> driver.upload_object('file.**txt',cont,'testfile2') > Traceback (most recent call last): > File "", line 1, in > File "python/libcloud/storage/**drivers/cloudfiles.py", line 304, in > upload_object > File "python/libcloud/storage/**drivers/cloudfiles.py", line 398, in > _put_object > File "python/libcloud/storage/base.**py", line 534, in _upload_object > File "python/libcloud/storage/**drivers/cloudfiles.py", line 123, in > request > File "python/libcloud/common/base.**py", line 385, in request > File "/home/arcmgr/lib/python2.7/**httplib.py", line 924, in putheader > str = '%s: %s' % (header, '\r\n\t'.join(values)) > TypeError: sequence item 0: expected string, long found > > > > > --bcaec520e5a737cdb404af0967b6--