You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/08 04:04:13 UTC
[GitHub] [airflow] MatrixManAtYrService opened a new issue, #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
MatrixManAtYrService opened a new issue, #25585:
URL: https://github.com/apache/airflow/issues/25585
### Apache Airflow version
main (development)
### What happened
I clicked `run` on a dag, and got this error:
```
Python version: 3.9.6
Airflow version: 2.4.0.dev0
Node: ChoedanKal
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/matt/2022/08/07/venv/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/matt/2022/08/07/venv/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/matt/2022/08/07/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/home/matt/2022/08/07/venv/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/matt/src/airflow/airflow/www/auth.py", line 46, in decorated
return func(*args, **kwargs)
File "/home/matt/src/airflow/airflow/www/decorators.py", line 80, in wrapper
return f(*args, **kwargs)
File "/home/matt/src/airflow/airflow/utils/session.py", line 71, in wrapper
return func(*args, session=session, **kwargs)
File "/home/matt/src/airflow/airflow/www/views.py", line 2091, in trigger
if unpause and dag.is_paused:
AttributeError: 'NoneType' object has no attribute 'is_paused'
```
I'll comment later if I can replicate it (haven't tried yet) but here's a gist with the dags involved: https://gist.github.com/MatrixManAtYrService/d48476594665ba0f8226b1347e1d50f0
First I had `messy.py` in my dags folder. Then I unpaused each task and ran the ones that say "start". I was expecting the whole mess of dags to eventually run, but only the start ones did. Then I said to myself:
> self, that's probably a bug, but let's see if we can replicate it with a simpler DAG, because `messy.py` is messy.
So I deleted `messy.py` and replaced it with `simpler.py`. Then I unpaused the two new tasks (indicated with "start") and tried to run them. Instead of running, I got the above error.
### What you think should happen instead
No error, dags should run
### How to reproduce
see above
### Operating System
NixOS (linux)
### Versions of Apache Airflow Providers
n/a
### Deployment
Virtualenv installation
### Deployment details
_No response_
### 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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #25585:
URL: https://github.com/apache/airflow/issues/25585#issuecomment-1207650114
I’m just guessing from the symptons. This happens if `DagBag.get_dag()` returns None (i.e. no such DAG found), while the DAG entry you see in the UI comes from the database. So it means the two are somehow out of sync, and judging that it “fixes” itself this is probably due to some sort of race condition in the DAG processor…? Not sure.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk closed issue #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
URL: https://github.com/apache/airflow/issues/25585
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] MatrixManAtYrService commented on issue #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
Posted by GitBox <gi...@apache.org>.
MatrixManAtYrService commented on issue #25585:
URL: https://github.com/apache/airflow/issues/25585#issuecomment-1207647363
Ok, so I just tried it again and the error didn't come up. I'm not sure if it's intermittent, or it depends on something that I've failed to make note of. I'll be on the lookout for it and I'll update here if I replicate it again.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #25585: Click "run" error: `AttributeError: 'NoneType' object has no attribute 'is_paused'`
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #25585:
URL: https://github.com/apache/airflow/issues/25585#issuecomment-1207783225
Yeah. Let's move it to discussion. I think this one is really coming from a race condition that should be occasional and some of them are really unavoidable until we introduce [DAG versioning](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-36+DAG+Versioning). Currently there are pleny of assumptions that our DAGs are in the same state in Scheduler, Webserver and workers and we do not even have a notion of "changing" DAG - there is no way to simply see that a DAG was "there" at a given time but was "missing" a moment later or the other way round. So if it changes in the middle, things like that can happen.
As long as it is self-recoverable, this is not a "huge" issue and DAG versioning is I think the only way to solve it "well" (or at least have a chance to be solved in a consistent way).
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org