Cannot use http operator
I installed airflow using sudo pip install airflow
I am trying to use SimpleHttpOperator from https://github.com/airbnb/airflow/blob/master/airflow/operators/http_operator.py
However, when I do from airflow.operators import SimpleHttpOperator in my dag definition file It gives me the error - ImportError: cannot import name SimpleHttpOperator
Does http operator work today?
P.S. is there any mailing list for Airflow today, (for naive queries like this)?
I realized the installed version of airflow is 1.2.0, and does not have the SimpleHttpOperator How do I install latest airflow version 1.2.1 ?
When I try to upgrade using sudo pip install --upgrade airflow, it eventually gives me an error - "IOError: Cannot find krb5.h, enusre you have installed krb5 development library. Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/python-krbV"
I have ubuntu 14.04 and already tried installing krb5 using - sudo apt-get install krb5-kdc krb5-admin-server
But the installation error does not go away. Any suggestions?
@kapil-malik I believe this is a case of the version on Pypi being a bit behind the documentation (and the repository). The latest version on Pypi seems to have been published on July 1st where as the http operator would appear to have been introduced on July 2nd.
https://github.com/airbnb/airflow/commits/master/airflow/operators/http_operator.py
@syvineckruyk yes, thanks for the reply. Indeed, I found it myself too. However, the upgrade of existing airflow installation - OR - a fresh airflow installation on another box gives me the error I mentioned above. Any suggestions around the same?
@kapil-malik Well you won't be able to upgrade past 1.2.0 using Pypi at the moment since that is the latest published version.
As for the error you are seeing above ... not sure not using Ubuntu and have never seen that error ... is this being triggered by the Pypi upgrade command or are you using the source from Github ?
If from source what command triggers the error ?
By the Pypi upgrade command, and also from a fresh Pypi installation on another Ubuntu box. Will try to explore what might be the issue.
Btw, to use the HttpOperator, can you suggest timeline for the next published release? OR, if I want to build from Github, are there any defined steps?
Again, is there a mailing list for such naive queries ?
@kapil-malik not aware of timeline but I would not expect it to be very long ...
As for your issue with Pypi ... i have not tried on Ubuntu ... but I believe this may be related to a missing python-dev installation (including dependencies). If you are working on a box that you can experiment on I would try that. But this is just a hunch.
Installing from Github is pretty straightforward but you run the risk of running an unstable version ... clone the repo, install the requirements (pip install -r requirements.txt ) install airflow (python setup.py install or python setup.py develop)
No mailing list that I know of for the moment.
I just pushed 1.3.0 out to pypi.
I don't know where the kerberos dependency comes from, I don't see it anywhere in my airflow install. Which higher level package is trowing this error?
Thanks for the github steps @syvineckruyk and for the update @mistercrunch kerberos dependency is coming from snakebite (in dependency.txt) ... I can reproduce it with sudo pip install snakebite I was able to get past it by sudo apt-get install libkrb5-dev Will update once I am able to complete a fresh install successfully.
I should move this as extras_require then. Thanks for your patience troubleshooting this, it will make it much easier to install Airflow for the wave of installers!
Related commit is out: https://github.com/airbnb/airflow/commit/3d51ef727645e7332333c5aaaf5f00738461b963?diff=unified
it missed the train to 1.3.0 on pypi though, I'll push another version later this week.
Hi @mistercrunch Thanks for the update. New release on pypi works like a charm. Here are the additional manual steps on Ubuntu 14.04 with python 2.7, python2.7-dev (pip) installed for sudo pip install airflow -
- export LANG=en_GB.UTF-8 I had LANG=en_US.UTF-8, which gives - http://stackoverflow.com/questions/10561923/unicodedecodeerror-ascii-codec-cant-decode-byte-0xef-in-position-1
- sudo apt-get install libkrb5-dev (this would go away I believe) Fixes error message : Cannot find krb5.h
- sudo apt-get install libsasl2-dev Fixes error message : Cannot find sasl.h
Needed for airflow initdb - 4. sudo pip install amqp, anyjson
I can see http operator and connection in 1.3.0. Can close this issue now. Thanks
We're all using LANG=en_US.UTF-8 and it's fine, I'd be curious to see the stack traces for some of these errors.
About libsasl2-dev, I assume you installed airflow[hive], I think sasl is needed by pyhs2.
I'll try installing on a fresh Ubuntu install and see what kind of troubles I hit.
@kapil-malik Thank you for your steps.
You guys are awesome! :+1: