arvindeybram opened a new issue #21909:
URL: https://github.com/apache/airflow/issues/21909


   ### Apache Airflow version
   
   2.2.2
   
   ### What happened
   
   I created an email operator fucntion -
   
   ```
   def AlertOperator(contact_list, message, html_content, task_id=''):
       if not task_id:
           task_id = "taskFailed"
       return EmailOperator(
           trigger_rule=TriggerRule.ONE_FAILED,
           task_id=task_id,
           to=contact_list,
           subject=message,
           html_content=html_content)
   
   ```
   
   This function is used by all my dags - 
   while adding it to one of the new dags I see dag import error
   
   `Broken DAG: [/home/platform/airflow/dags/reports/zynga.py] Traceback (most 
recent call last):
     File 
"/home/platform/.local/lib/python3.7/site-packages/airflow/models/baseoperator.py",
 line 1481, in set_downstream
       self._set_relatives(task_or_task_list, upstream=False, 
edge_modifier=edge_modifier)
     File 
"/home/platform/.local/lib/python3.7/site-packages/airflow/models/baseoperator.py",
 line 1470, in _set_relatives
       edge_modifier.add_edge_info(self.dag, self.task_id, task.task_id)
   AttributeError: 'EmailOperator' object has no attribute 'add_edge_info'`
   function
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   centos 7
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   I have installed airflow via pip on bare metal
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to