Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:s3-mp-upload:global name 'do_part_download' is not defined #20

Open
nicklee76 opened this issue Mar 24, 2014 · 3 comments
Open

ERROR:s3-mp-upload:global name 'do_part_download' is not defined #20

nicklee76 opened this issue Mar 24, 2014 · 3 comments

Comments

@nicklee76
Copy link

Hi all,

I don't see "do_part_download" from "s3_multipart_parallel_upload.py". Is this a code mistake?

Thanks,

try:
    # Do the upload
    t1 = time.time()
    mpu.upload_part_from_file(StringIO(data), i+1, cb=progress)

    # Print some timings
    t2 = time.time() - t1
    s = len(data)/1024./1024.
    logger.info("Uploaded part %s (%0.2fM) in %0.2fs at %0.2fMbps" % (i+1, s, t2, s/t2))
except Exception, err:
    logger.debug("Retry request %d of max %d times" % (current_tries, max_tries))
    if (current_tries > max_tries):
        logger.error(err)
    else:
        time.sleep(3)
        current_tries += 1
        do_part_download(bucket_name, mpu_id, fname, i, start, size, secure, max_tries, current_tries)

@rread
Copy link

rread commented Mar 24, 2014

That's actually fixed in my big "flake8" PR.

@nicklee76
Copy link
Author

rread, I see you have fixed it with "do_part_upload" as following,

 do_part_upload(bucket_name, mpu_id, fname, i, start, size, secure, max_tries, current_tries)

But I am thinking it needs additional pair of bracket... like "do_part_upload((.......))"?

@rread
Copy link

rread commented Mar 25, 2014

Good point, and the similar call do_part_download() in s3-mp-download.py() needs that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants