[ 
https://issues.apache.org/jira/browse/AIRFLOW-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16736927#comment-16736927
 ] 

ASF GitHub Bot commented on AIRFLOW-3519:
-----------------------------------------

kaxil commented on pull request #4455: [AIRFLOW-3519] Fix example http operator
URL: https://github.com/apache/airflow/pull/4455
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> example_http_operator is failing due to 
> ----------------------------------------
>
>                 Key: AIRFLOW-3519
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3519
>             Project: Apache Airflow
>          Issue Type: Bug
>         Environment: Windows 10 professional edition.Apache airflow 
>            Reporter: Arunachalam Ambikapathi
>            Assignee: Felix Uellendall
>            Priority: Minor
>
> When example_http_operator DAG is called from command line, 
>  ./airflow trigger_dag example_http_operator
> it was throwing error 
>  [2018-12-13 10:37:41,892]
> {logging_mixin.py:95}
> INFO - [2018-12-13 10:37:41,892]
> {http_hook.py:126}
> INFO - Sending 'GET' to url: [https://www.google.com/]
> [2018-12-13 10:37:41,992]
> {logging_mixin.py:95}
> WARNING - 
> /home/arun1/.local/lib/python3.5/site-packages/urllib3/connectionpool.py:847: 
> InsecureRequestWarning: Unverified HTTPS request is being made. Adding 
> certificate verification is strongly advised. See: 
> [https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings]
>  InsecureRequestWarning)
>  [2018-12-13 10:37:42,064]
> {models.py:1760}
> *ERROR - a bytes-like object is required, not 'str'*
> This may be due to this was not tested in python3.5 version.
>  *Fix:*
>  I changed the dag to this and tested it is working.
> from 
> response_check=lambda response: True if "Google" in response.content else 
> False,
> to 
> response_check=lambda response: True if *b'Google'* in response.content else 
> False,
> Please apply this in the example it would help new users a lot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to