I set "start_date" as datetime but anyway I got this error
See original GitHub issueApache Airflow version: 2.0.0
Kubernetes version (if you are using kubernetes) (use kubectl version
):
Environment:
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a
): - Install tools:
- Others:
What happened:
Python version: 3.8.6 Airflow version: 2.0.0 Node: 48e4ab66fdda
Traceback (most recent call last): File “/home/airflow/.local/lib/python3.8/site-packages/flask/app.py”, line 2447, in wsgi_app response = self.full_dispatch_request() File “/home/airflow/.local/lib/python3.8/site-packages/flask/app.py”, line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File “/home/airflow/.local/lib/python3.8/site-packages/flask/app.py”, line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File “/home/airflow/.local/lib/python3.8/site-packages/flask/_compat.py”, line 39, in reraise raise value File “/home/airflow/.local/lib/python3.8/site-packages/flask/app.py”, line 1950, in full_dispatch_request rv = self.dispatch_request() File “/home/airflow/.local/lib/python3.8/site-packages/flask/app.py”, line 1936, in dispatch_request return self.view_functionsrule.endpoint File “/home/airflow/.local/lib/python3.8/site-packages/airflow/www/auth.py”, line 34, in decorated return func(*args, **kwargs) File “/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py”, line 60, in wrapper return f(*args, **kwargs) File “/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py”, line 1193, in task attr = getattr(ti, attr_name) File “/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py”, line 792, in previous_start_date_success return self.get_previous_start_date(state=State.SUCCESS) File “/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py”, line 65, in wrapper return func(*args, session=session, **kwargs) File “/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py”, line 776, in get_previous_start_date return prev_ti and pendulum.instance(prev_ti.start_date) File “/home/airflow/.local/lib/python3.8/site-packages/pendulum/init.py”, line 174, in instance raise ValueError(“instance() only accepts datetime objects.”) ValueError: instance() only accepts datetime objects.
What you expected to happen:
Get info about task instance
How to reproduce it:
Anything else we need to know:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top GitHub Comments
This is fixed by https://github.com/apache/airflow/pull/14416 and will be released in 2.0.2
Can you please share a reproduce example? The traceback suggest that you are using
get_previous_start_date
in your DAG. I have a guess that you are using one of the prev date success macros and you encounter this error in the first run on Airflow 2.0.0 but not on Airflow 1.10.X?