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.

fs = s3fs.S3FileSystem(profile_name='profile') TypeError: __init__() got an unexpected keyword argument 'profile_name'

See original GitHub issue

What happened:

Wanted to use s3fs with an AWS profilename.

What you expected to happen:

Connect and work with s3_fs.

Minimal Complete Verifiable Example:

tried:

s3_fs = s3fs.S3FileSystem(profile_name='role')

TypeError: init() got an unexpected keyword argument ‘profile_name’

from s3fs import S3FileSystem
import boto3
session = boto3.session.Session(profile_name="aws-biadmin", region_name='us-east-1')
s3_fs = S3FileSystem(anon=False)

NoCredentialsError: Unable to locate credentials

from s3fs.core import S3FileSystem

s3_fs = S3FileSystem(anon=False, client_kwargs={'profile_name':"aws-biadmin", 'region_name': 'us-east-1'})

TypeError: create_client() got an unexpected keyword argument ‘profile_name’

from s3fs.core import S3FileSystem

s3_fs = S3FileSystem(anon=False, s3_additional_kwargs={'profile_name':"aws-biadmin", 'region_name': 'us-east-1'})
## This finally accepts it, but does not convey it
s3_fs.ls('s3://bucket/folder')

NoCredentialsError: Unable to locate credentials

from s3fs.core import S3FileSystem
s3_fs = S3FileSystem(anon=False, config_kwargs={'profile_name':"aws-biadmin"})

TypeError: Got unexpected keyword argument 'profile_name

Anything else we need to know? Multiple past issues states that kwargs should work

Environment:

  • s3fs version: ‘0.4.2’
  • Python version: sys.version_info(major=3, minor=7, micro=1, releaselevel=‘final’, serial=0)
  • Operating System: MAC OSX
  • Install method (conda, pip, source): pip3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
martindurantcommented, Jun 5, 2020

Should have been “profile_name” -> “profile”

1reaction
martindurantcommented, Aug 28, 2020

Dod you call as s3fs.S3FileSystem(profile='role') or something else?

Read more comments on GitHub >

github_iconTop Results From Across the Web

fs = s3fs.S3FileSystem(profile_name='profile') TypeError: __ ...
TypeError : init() got an unexpected keyword argument 'profile_name'. from s3fs import S3FileSystem import boto3 session = boto3.session.
Read more >
S3Fs — S3Fs 2022.11.0+4.g5917684 documentation
S3Fs is a Pythonic file interface to S3. It builds on top of botocore. The top-level class S3FileSystem holds connection information and allows...
Read more >
TypeError: __init__() got an unexpected keyword argument ...
Based on the error message only, I would suggest putting **kwargs in __init__ . This object will then accept any other keyword argument...
Read more >
S3Fs Documentation - Read the Docs
S3Fs is a Pythonic file interface to S3. It builds on top of botocore. The top-level class S3FileSystem holds connection information and ...
Read more >
pyarrow.fs.S3FileSystem — Apache Arrow v10.0.1
In AWS S3, the bucket and all objects will be not publicly visible, and will have no bucket policies and no resource tags....
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