-
Notifications
You must be signed in to change notification settings - Fork 670
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
wr.s3.to_deltalake
throwing TypeError about storage_options
#2378
Comments
The
|
Did it ... boto3_session = boto3.Session(region_name="eu-west-1") # Yes, the region is correct
wrangler.s3.to_deltalake(
df=data,
path="s3://mybucket/delta", # Yes, the bucket exists
index=False,
partition_cols=["a", "b"],
overwrite_schema=True,
boto3_session=boto3_session,
s3_allow_unsafe_rename=True,
) But I keep getting the same error:
I enabled logging (INFO level) with: logging.basicConfig(level=logging.INFO, format="[%(name)s][%(funcName)s] %(message)s")
logging.getLogger("awswrangler").setLevel(logging.INFO) And I see this in logs just before the error above...
Any further suggestions on how to fix this? Here's the error trace:
|
Hmm strange, I am unable to replicate this error on my local:
works fine. Could you share your pip freeze? I imagine you are on deltalake 0.9.0? Also please try to make the call directly using the deltalake library, which is pretty much what we are doing. At which point it might be worth opening an issue in delta-rs directly. |
we.s3.to_deltalake
throwing TypeError about storage_optionswr.s3.to_deltalake
throwing TypeError about storage_options
I recive the same error here: wr.s3.to_deltalake( argument 'storage_options': 'NoneType' object cannot be converted to 'PyString' |
Please, reeopen this ticket. This issue continues to happen even in version 3.3.0 |
I saw that the error happens when we use a boto.session. I don't know if it's a deltalake-rs issue or an awswrangler issue |
I'm using poetry as a dependencies manager, and my pyproject.tom is: [tool.poetry.dependencies] |
I gently ask to reopen this issue, I am facing the very same problem. I'm using version 3.4.1. |
I am facing this issue with wr.s3.read_deltalake as follows: df = wr.s3.read_deltalake(path=label_path, columns=[label_field], boto3_session=session) |
This issue can occur when no region is associated with the profile in to_deltalake() pulls a @leodido In your case, it could be the
|
I had this problem too. It looks to me like the 'AWS_SESSION_TOKEN' being None is clashing with the constructor expecting a dictionary of strings. (Perhaps the underlying C++ code does not handle None for string??) I tried this workaround in the init function of the DeltaTable class, prior to the creation of the DataRawTable:
It stopped the type error and having a blank value in the AWS_SESSION_TOKEN did not cause a problem, as the write completed without error. |
I've had same error in AWS environment while locally everything was working fine. Got it fixed by adding before calling
|
Thanks, vavaan, for your update. That didn't work for me. Before calling
I tried changing this to use Thanks again for your response. |
I just set the unused AWS_SESSION_TOKEN to an empty string to override it from being set to None when calling to_deltalake to fix the issue:
|
Describe the bug
Calling
we.s3.to_deltalake()
throws the following error:How to Reproduce
Expected behavior
I'd expect
awswrangler
to connect to S3 and write the delta table.Your project
No response
Screenshots
No response
OS
Mac
Python version
3.11.4
AWS SDK for pandas version
3.2.1
Additional context
No response
The text was updated successfully, but these errors were encountered: