Skip to content
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

S3 hook causing exception from credentials unpacking #3

Open
vaughnkoch opened this issue Jul 25, 2018 · 0 comments
Open

S3 hook causing exception from credentials unpacking #3

vaughnkoch opened this issue Jul 25, 2018 · 0 comments

Comments

@vaughnkoch
Copy link

I'm seeing this exception using Airflow v1.10.0rc2.

Traceback (most recent call last):
  File "******/data/virtualenvs/airpipe/bin/airflow", line 32, in <module>
    args.func(args)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/utils/cli.py", line 74, in wrapper
    return f(*args, **kwargs)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/bin/cli.py", line 593, in test
    ti.run(ignore_task_deps=True, ignore_ti_state=True, test_mode=True)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
    return func(*args, **kwargs)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/models.py", line 1723, in run
    session=session)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/utils/db.py", line 70, in wrapper
    return func(*args, **kwargs)
  File "******/data/virtualenvs/airpipe/lib/python3.6/site-packages/airflow/models.py", line 1632, in _run_raw_task
    result = task_copy.execute(context=context)
  File "******/airflow/plugins/snowflake_plugin/operators/s3_to_snowflake_operator.py", line 75, in execute
    sql = self.build_copy()
  File "******/airflow/plugins/snowflake_plugin/operators/s3_to_snowflake_operator.py", line 44, in build_copy
    s3_hook = S3Hook(self.s3_conn_id)
ValueError: too many values to unpack (expected 2)

This seems to be caused by the fact that get_credentials is returning a ReadOnlyCredentials object which isn't a 2-tuple, but the code expects a 2-tuple.

ipdb> s3_hook.get_credentials()
ReadOnlyCredentials(access_key='*************', secret_key='*************', token=None)

Code failing:

a_key , s_key = s3_hook.get_credentials()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant