eladkal commented on pull request #17349:
URL: https://github.com/apache/airflow/pull/17349#issuecomment-961879110


   @rounakdatta can you please take a look at the error?
   ```
     ERROR [airflow.models.dagbag.DagBag] Failed to import: 
/opt/airflow/airflow/example_dags/tutorial_taskflow_api_etl_virtualenv.py
     Traceback (most recent call last):
       File "/opt/airflow/airflow/models/dagbag.py", line 331, in 
_load_modules_from_file
         loader.exec_module(new_module)
       File "<frozen importlib._bootstrap_external>", line 850, in exec_module
       File "<frozen importlib._bootstrap>", line 228, in 
_call_with_frames_removed
       File 
"/opt/airflow/airflow/example_dags/tutorial_taskflow_api_etl_virtualenv.py", 
line 22, in <module>
         from airflow.decorators import dag, task
       File "/opt/airflow/airflow/decorators/__init__.py", line 20, in <module>
         from airflow.decorators.python import PythonDecoratorMixin, 
python_task  # noqa
       File "/opt/airflow/airflow/decorators/python.py", line 21, in <module>
         from airflow.operators.python import PythonOperator
       File "/opt/airflow/airflow/operators/python.py", line 252, in <module>
         class PythonVirtualenvOperator(PythonOperator):
       File "/opt/airflow/airflow/operators/python.py", line 341, in 
PythonVirtualenvOperator
         requirements: Optional[Iterable[str], str] = None,
       File "/usr/local/lib/python3.9/typing.py", line 275, in inner
         return func(*args, **kwds)
       File "/usr/local/lib/python3.9/typing.py", line 352, in __getitem__
         return self._getitem(self, parameters)
       File "/usr/local/lib/python3.9/typing.py", line 475, in Optional
         arg = _type_check(parameters, f"{self} requires a single type.")
       File "/usr/local/lib/python3.9/typing.py", line 164, in _type_check
         raise TypeError(f"{msg} Got {arg!r:.100}.")
     TypeError: typing.Optional requires a single type. Got 
(typing.Iterable[str], <class 'str'>).
   ```


-- 
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