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

Looks like a regression to slack operator in 1.7.0rc1 #1215

Closed
syvineckruyk opened this issue Mar 25, 2016 · 4 comments
Closed

Looks like a regression to slack operator in 1.7.0rc1 #1215

syvineckruyk opened this issue Mar 25, 2016 · 4 comments

Comments

@syvineckruyk
Copy link
Contributor

Looks like it was introduced by PR.
#792

CC: @abridgett

Traceback (most recent call last):
File "/home/airflow/.pyenv/versions/airflow/bin/airflow", line 4, in
import('pkg_resources').run_script('airflow==1.6.2', 'airflow')
File "/home/airflow/.pyenv/versions/airflow/lib/python2.7/site-packages/pkg_resources/init.py", line 726, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/airflow/.pyenv/versions/airflow/lib/python2.7/site-packages/pkg_resources/init.py", line 1484, in run_script
exec(code, namespace, namespace)
File "/home/airflow/.pyenv/versions/2.7.10/envs/airflow/lib/python2.7/site-packages/airflow-1.6.2-py2.7.egg/EGG-INFO/scripts/airflow", line 15, in
args.func(args)
File "/home/airflow/.pyenv/versions/airflow/lib/python2.7/site-packages/airflow-1.6.2-py2.7.egg/airflow/bin/cli.py", line 203, in run
pool=args.pool,
File "/home/airflow/.pyenv/versions/airflow/lib/python2.7/site-packages/airflow-1.6.2-py2.7.egg/airflow/models.py", line 1067, in run
result = task_copy.execute(context=context)
File "/home/airflow/.pyenv/versions/2.7.10/envs/airflow/lib/python2.7/site-packages/airflow-1.6.2-py2.7.egg/airflow/operators/slack_operator.py", line 52, in execute
rc = json.loads(sc.api_call(self.method, **self.api_params).decode('utf-8'))
AttributeError: 'dict' object has no attribute 'decode'

@abridgett
Copy link
Contributor

It looks like the slackclient's API changed in v1.0:
https://github.com/slackhq/python-slackclient/blob/master/CHANGELOG.md

So using v0.18.0 should work for now, alternatively I'm just prepping a little patch.

abridgett added a commit to abridgett/airflow that referenced this issue Mar 25, 2016
@syvineckruyk
Copy link
Contributor Author

👍 Awesome ... @abridgett apologies for not catching the the slack client change in airflow.

@abridgett
Copy link
Contributor

No worries at all! Never a problem to ask :-)

@bolkedebruin
Copy link
Contributor

@mistercrunch was this imported to 1.7.0?

bolkedebruin pushed a commit that referenced this issue Apr 2, 2016
…turns_decoded_dict

[#1215] slackclient v1.0.0 returns a decoded dict
abridgett added a commit to abridgett/airflow that referenced this issue Apr 4, 2016
* master: (325 commits)
  [apache#1215] slackclient v1.0.0 returns a decoded dict
  Fix typos in models.py
  Fix broken links in documentation
  [hotfix] fixing the Scheduler CLI to make dag_id optional
  added Glassdoor to "who uses airflow"
  Fix typo preventing from launching webserver
  Documentation badge
  Fixing ISSUE_TEMPLATE name to include .md suffix
  Adding an ISSUE_TEMPLATE to ensure that issues are adequately defined
  Linting & debugging
  Refactoring the CLI to be data-driven
  Updating the Bug Reporting protocol in the Contributing.md file
  Fixing the docs
  clean up references to old session
  remove session reference
  clear xcom data when task instance starts
  replace main_session with @provide_session
  Add extras to installation.rst
  Changes to Contributing to reflect more closely the current state of development.
  Modifying README to link to the wiki committer list
  ...
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

3 participants