-
Notifications
You must be signed in to change notification settings - Fork 276
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
"coroutine object is not subscriptable" error calling get_delegated_s3pars #774
Comments
Can you try with async with self.session.create_client("sts") as sts:
cred = (await sts.get_session_token(DurationSeconds=exp))["Credentials"]
return {
"key": cred["AccessKeyId"],
"secret": cred["SecretAccessKey"],
"token": cred["SessionToken"],
"anon": False,
} |
In this way this error disappears.
I’m having another problem, that is the problem that I’m facing with using directly boto3 client and get_session_token:
Unable to locate credentials
I wish I will fix it configuring right env variables, but for this issue I think your fix is right!
Cinzia La Morgia
Senior Specialist
***@***.***
Piazza Trento e Trieste, 3
40137
,
Bologna
phone:
+390516480911<tel:+390516480911>
mobile:
+393440248742<tel:+393440248742>
www.prometeia.com<https://www.prometeia.com/it/home>
***@***.***<https://www.linkedin.com/company/prometeia>
***@***.***<https://twitter.com/PrometeiaGroup>
***@***.***<https://www.instagram.com/prometeiagroup/>
***@***.***<https://www.youtube.com/channel/UCbz97h9v96HGofLJiZrScEw>
Please consider the environment before printing this email
Da: Martin Durant ***@***.***>
Data: mercoledì, 23 agosto 2023, 16:30
A: fsspec/s3fs ***@***.***>
Cc: Cinzia La Morgia ***@***.***>, Author ***@***.***>
Oggetto: Re: [fsspec/s3fs] "coroutine object is not subscriptable" error calling get_delegated_s3pars (Issue #774)
Can you try with
async with self.session.create_client("sts") as sts:
cred = (await sts.get_session_token(DurationSeconds=exp))["Credentials"]
return {
"key": cred["AccessKeyId"],
"secret": cred["SecretAccessKey"],
"token": cred["SessionToken"],
"anon": False,
}
—
Reply to this email directly, view it on GitHub<#774 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWOD2LDBI7TP5SHM2HONKO3XWYHWZANCNFSM6AAAAAA33RZKLQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
You are most welcome to propose that change to the code as a PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to connect to a MinIO S3 compatible storage and to create a session token, with this code:
I'm having this error:
Failed to generate temporary token for S3: 'coroutine' object is not subscriptable
The problem seems to be in core.py, in this section:
I can see that get_session_token result is a coroutine (coroutine object AioBaseClient._make_api_call).
Why it's trying to get the "Credentials" key from a coroutine?
Thank you for your work!
The text was updated successfully, but these errors were encountered: