question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling Format gone?

See original GitHub issue

I can’t find any reference to S3 “calling format” in boto3. At first I thought it was just a documentation oversight, but I can’t find anything like that in the source code, either (though the source code is completely different from boto2, so maybe I just don’t know what to look for).

Is this feature gone? Without OrdinaryCallingFormat, is it now impossible to use this with fake-s3?

I found this page which suggests this will help:

from botocore.utils import fix_s3_host
resource.meta.client.meta.events.unregister('before-sign.s3', fix_s3_host)

but it doesn’t seem to make a difference.

Here’s the simplified test case I’m working with:

import boto3
from StringIO import StringIO
session = boto3.session.Session(aws_access_key_id='1',
                                aws_secret_access_key='2',
                                region_name='3')
s3 = session.resource('s3', endpoint_url='http://localhost:5353', use_ssl=False)
bucket = s3.Bucket('my-local-bucket')

obj = bucket.Object(key='my-test-key')
obj.put(StringIO("abc"))

obj = bucket.Object(key='my-test-key')
obj.get()['Body'].read()  # returns the empty string

The documentation doesn’t say, but empirically, it seems the keys passed to Session can’t be None, but they can be any string.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jameslscommented, Nov 2, 2015

It might help to turn on debug logging to see what endpoints it’s trying to connect to. At the top of your script you can add:

import boto3
boto3.set_stream_logger(name='')

And it will print out debug logs to stderr.

0reactions
jameslscommented, Nov 13, 2015

#325 is merged, closing out issue. Also @kengruven that latest issue you’re running into is the same as boto/botocore#601. Let’s track that issue over there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wrong telephone number format - Apple Support Communities
The workaround that worked for me is to maintain all phone numbers on iDevices in E.164 format. Change all UK numbers from 01234...
Read more >
iPhone Telephone Numbers Format Incorrect after IOS Update ...
iPhone Telephone Numbers Format Incorrect after IOS Update Fix.So you've done an IOS update and now your telephone contacts are in the wrong ......
Read more >
iPhone phone number formatted incorrectly after IOS 14 ...
iPhone phone number formatted incorrectly after IOS 14 Update Fix.So you've done an iOS 14 update and now your iPhone telephone contacts are ......
Read more >
iPhone Phone number showing in US format in contacts when ...
We realised that dial assist has switched itself on and some of the numbers in the contact app were showing in US format...
Read more >
Telephone number isn't visible or appears in an unexpected ...
Unexpected formatting can also occur when a user has an Outlook contact who has the same number as the Lync contact. This data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found