Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum recursion depth exceeded when running chalice deploy #531

Closed
twslankard opened this issue Sep 11, 2017 · 2 comments
Closed

Maximum recursion depth exceeded when running chalice deploy #531

twslankard opened this issue Sep 11, 2017 · 2 comments
Labels

Comments

@twslankard
Copy link

twslankard commented Sep 11, 2017

Hey all,

I'm working on deployment for a my new Chalice-based project (using version 1.0.2.)

When I run chalice deploy I get the error maximum recursion depth exceeded with no stack trace. After running the debugger, I was able to narrow down the problem to Chalice's AST traversal code. From there, I created a reduction using my app.py. Given this, it appears as though the AST traversal code does not tolerate recursion.

Here's the reduced app.py. If I remove the recursive function, then chalice deploy appears to work as expected.

from chalice import Chalice

app = Chalice(app_name='recursion')
app.debug = True


def recursive_function(obj):
    if False:
        recursive_function(obj)


@app.route('/')
def index():
    recursive_function({})
    return {}
@twslankard
Copy link
Author

I discovered something interesting: apparently, recursive functions are okay if they're not in app.py. I'm looking into this further.

@stealthycoin
Copy link
Contributor

Thanks for reporting this. It works for recursion in app.py since the analyzer currently only explores app.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants