sequence item 0: expected string, int found

2010-08-26
2013-02-19
  • Nobody/Anonymous

    I'm using s3cmd 0.9.9.91 with python 2.7 and when I use s3cmd ls, I get the following:

    DEBUG: Updating Config.Config encoding -> UTF-8
    DEBUG: Updating Config.Config verbosity -> 30
    DEBUG: Unicodising 'ls' using UTF-8
    DEBUG: Command: ls
    DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Thu, 26 Aug 2010 02:20:28 +0000\n/'
    DEBUG: CreateRequest: resource=/
    DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Thu, 26 Aug 2010 02:20:28 +0000\n/'
    DEBUG: Processing request, please wait…
    DEBUG: get_hostname(None): s3.amazonaws.com
    DEBUG: format_uri(): /
    WARNING: Retrying failed request: / (sequence item 0: expected string, int found)
    WARNING: Waiting 3 sec…
    DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-date:Thu, 26 Aug 2010 02:20:31 +0000\n/'
    DEBUG: Processing request, please wait…
    DEBUG: get_hostname(None): s3.amazonaws.com
    DEBUG: format_uri(): /
    WARNING: Retrying failed request: / (sequence item 0: expected string, int found)
    WARNING: Waiting 6 sec…
    See ya!

    Has anyone else run in to this?

     
  • Michal Ludvig

    Michal Ludvig - 2010-08-26

    Hi, is it still reproducible or has it gone away in the meantime? I can't reproduce it here…

     
  • Nobody/Anonymous

    Hi Ludvig,

    Yes it's still reproducible.  I'm just installed it last night so I was wondering if I had any configuration errors.  Here's a copy of my config file with the key and secret key left out.

    access_key = ************
    acl_public = False
    bucket_location = US
    cloudfront_host = cloudfront.amazonaws.com
    cloudfront_resource = /2008-06-30/distribution
    default_mime_type = binary/octet-stream
    delete_removed = False
    dry_run = False
    encoding = UTF-8
    encrypt = False
    force = False
    get_continue = False
    gpg_command = /usr/bin/gpg
    gpg_decrypt = %(gpg_command)s -d -verbose -no-use-agent -batch -yes -passphrase-fd %(passphrase_fd)s -o %(output_file
    )s %(input_file)s
    gpg_encrypt = %(gpg_command)s -c -verbose -no-use-agent -batch -yes -passphrase-fd %(passphrase_fd)s -o %(output_file
    )s %(input_file)s
    gpg_passphrase =
    guess_mime_type = True
    host_base = s3.amazonaws.com
    host_bucket = %(bucket)s.s3.amazonaws.com
    human_readable_sizes = False
    list_md5 = False
    preserve_attrs = True
    progress_meter = True
    proxy_host =
    proxy_port = 0
    recursive = False
    recv_chunk = 4096
    secret_key = ****************
    send_chunk = 4096
    simpledb_host = sdb.amazonaws.com
    skip_existing = False
    urlencoding_mode = normal
    use_https = False
    verbosity = DEBUG

     
  • Nobody/Anonymous

    i have this too.  did you solve it?

     
  • Nobody/Anonymous

    I had this problem as well when running on Python 2.7   As soon as I tried it with Python 2.6 and 2.5 it worked.

     
  • Nobody/Anonymous

    Before you build via python ./setup.py install modify the ../S3/S3.py file after line 409 and add this line (as 410):
    headers = '' + str(headers) + ''

    The extra '' quotes are not needed but just added to illustrate what's going on here…it will also work if you just copy that line too. Make sure your indentations line up (2 tabs in my case on linux).

    The issue has to do with the content-length value being set to 0 as an integer. It needs to evaluate as a string for the next call. Listing the root of your S3:// buckets is the sample test on configuring so it 'appears' that it fails, although it really is likely setup properly.

    Hope this helps someone else. No need to revert back to 2.6 or 2.5 if you need 2.7 for other items on your system.

    -Chris

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks