Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8909937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:33:42+00:00 2026-06-15T03:33:42+00:00

I am using python and boto this is my code: key = bucket.get_key(key_name) if

  • 0

I am using python and boto

this is my code:

key = bucket.get_key(key_name)
if not key:
    print 'error, key does not exist'
    return
data = key.get_contents_as_string()

sometimes (appears randomly) i get this exception:

S3ResponseError: S3ResponseError: 404 Not Found

NOTE: the file is uploaded by one server and then immediately afterwards another server (located in a different continent) is running the code above.

the traceback:

Traceback (most recent call last): File “/test.py”, line 222, in _process_response

data = key.get_contents_as_string() File “/usr/lib/python2.6/site-packages/boto-2.1.1-py2.6.egg/boto/s3/key.py”,

line 1201, in get_contents_as_string
response_headers=response_headers) File “/usr/lib/python2.6/site-packages/boto-2.1.1-py2.6.egg/boto/s3/key.py”,

line 1093, in get_contents_to_file
response_headers=response_headers) File “/usr/lib/python2.6/site-packages/boto-2.1.1-py2.6.egg/boto/s3/key.py”,

line 996, in get_file
override_num_retries=override_num_retries) File “/usr/lib/python2.6/site-packages/boto-2.1.1-py2.6.egg/boto/s3/key.py”,

line 211, in open
override_num_retries=override_num_retries) File “/usr/lib/python2.6/site-packages/boto-2.1.1-py2.6.egg/boto/s3/key.py”,

line 165, in open_read
self.resp.reason, body) S3ResponseError: S3ResponseError: 404 Not Found

NoSuchKeyThe specified key does not
exist.key_nameidhost_id

so i get the key but then when i try and read from it i get ‘not found’.
any idea ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:33:43+00:00Added an answer on June 15, 2026 at 3:33 am

    This is expected behaviour, according to Amazon S3 developer guide:

    … However, information about the changes might not immediately replicate across Amazon S3 and you might observe the following behaviors: A process writes a new object to Amazon S3 and immediately attempts to read it. Until the change is fully propagated, Amazon S3 might report “key does not exist.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the boto library in Python to connect to DynamoDB. The following code
I am using Python Boto to download all the files in a bucket to
I'm new to Python, and stumped by this piece of code from the Boto
Using Python v2, I have the following code: print (Total of the sale is:
I have a python script using the boto library on ec2 instance which is
Using Python, how does one parse/access files with Linux-specific features, like ~/.mozilla/firefox/*.default ? I've
I'm using AWS for the first time and have just installed boto for python.
Using Python, how do I print the lines of a text file, given a
Using Python 2.4, how do I print a list in a nice tabular format?
I am writing a script using boto and Python to automatically launch an Amazon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.