RecursionError: maximum recursion depth exceeded while calling a Python object #18004
Replies: 5 comments 1 reply
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
@microhuang, can you explain how we can reproduce the issue? Without reproduction steps or more explanations, we won't know how to help with this. |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce this problem. It sometimes happens (it's a low-frequency phenomenon) and sometimes it doesn't happen. I don't understand the reason. |
Beta Was this translation helpful? Give feedback.
-
Converted it to discussion until we at least get some clue where it can come from. Can you provide more information - i.e. logs from the webserver, when it happens, what happens if you get it "successfully" rendered wihout recursion what kind of log/task information you see when you succeed? IT seems to mee that you have somewhere a complex jinja template which causes inifinite recursion. - almost as if you embedded the '{% include %}` in one of your jinja templates that cause jinja to recursively load the same file. Could you please extract any non-standard/suspicious jinja directives you use in your configuration/files/DAGs? |
Beta Was this translation helpful? Give feedback.
-
please are you slove this problem? |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.1.3 (latest released)
Operating System
CentOS 8
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
What happened
An error occurred while navigating this url -- /log?dag_id=demo2&task_id=ddd&execution_date=2021-09-03T06%3A00%3A00%2B00%3A00
Something bad has happened.
Airflow is used by many users, and it is very likely that others had similar problems and you can easily find
a solution to your problem.
Consider following these steps:
gather the relevant information (detailed logs with errors, reproduction steps, details of your deployment)
find similar issues using:
if you run Airflow on a Managed Service, consider opening an issue using the service support channels
if you tried and have difficulty with diagnosing and fixing the problem yourself, consider creating a bug report.
Make sure however, to include all relevant details and results of your investigation so far.
Python version: 3.9.5
Airflow version: 2.1.3
Node: localhost.localdomain
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/opt/work/airflow.git/airflow/www/auth.py", line 49, in decorated
return func(*args, **kwargs)
File "/opt/work/airflow.git/airflow/www/decorators.py", line 71, in wrapper
return f(*args, **kwargs)
File "/opt/work/airflow.git/airflow/utils/session.py", line 70, in wrapper
return func(*args, session=session, **kwargs)
File "/opt/work/airflow.git/airflow/www/views.py", line 1282, in log
return self.render_template(
File "/opt/work/airflow.git/airflow/www/views.py", line 471, in render_template
return super().render_template(
File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/baseviews.py", line 287, in render_template
return render_template(
File "/usr/local/lib/python3.9/site-packages/flask/templating.py", line 138, in render_template
ctx.app.jinja_env.get_or_select_template(template_name_or_list),
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 930, in get_or_select_template
return self.get_template(template_name_or_list, parent, globals)
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 883, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 857, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 115, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.9/site-packages/flask/templating.py", line 60, in get_source
return self._get_source_fast(environment, template)
File "/usr/local/lib/python3.9/site-packages/flask/templating.py", line 86, in _get_source_fast
return loader.get_source(environment, template)
File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 417, in get_source
return loader.get_source(environment, template)
File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 417, in get_source
return loader.get_source(environment, template)
File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 417, in get_source
return loader.get_source(environment, template)
[Previous line repeated 958 more times]
File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 180, in get_source
f = open_if_exists(filename)
File "/usr/local/lib/python3.9/site-packages/jinja2/utils.py", line 141, in open_if_exists
if not os.path.isfile(filename):
File "/usr/local/lib/python3.9/genericpath.py", line 30, in isfile
st = os.stat(path)
RecursionError: maximum recursion depth exceeded while calling a Python object
What you expected to happen
No response
How to reproduce
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions