fs = s3fs.S3FileSystem(profile_name='profile') TypeError: __init__() got an unexpected keyword argument 'profile_name'
See original GitHub issueWhat 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:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should have been “profile_name” -> “profile”
Dod you call as
s3fs.S3FileSystem(profile='role')
or something else?