RecursionError: maximum recursion depth exceeded while calling a Python object
See original GitHub issueWhen two tables have foreign keys that reference each other:
Traceback (most recent call last):
File "/Users/tekumara/.local/bin/sqlite_web", line 8, in <module>
sys.exit(main())
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/sqlite_web/sqlite_web.py", line 841, in main
initialize_app(args[0], options.read_only, password, options.url_prefix)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/sqlite_web/sqlite_web.py", line 812, in initialize_app
dataset = SqliteDataSet('sqlite:///%s' % filename, bare_fields=True)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/dataset.py", line 48, in __init__
**kwargs)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/reflection.py", line 764, in generate_models
_create_model(table, models)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/reflection.py", line 688, in _create_model
_create_model(dest, models)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/reflection.py", line 688, in _create_model
_create_model(dest, models)
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/reflection.py", line 688, in _create_model
_create_model(dest, models)
[Previous line repeated 989 more times]
File "/Users/tekumara/.local/pipx/venvs/sqlite-web/lib/python3.7/site-packages/playhouse/reflection.py", line 684, in _create_model
for foreign_key in database.foreign_keys[table]:
RecursionError: maximum recursion depth exceeded while calling a Python object
peewee 3.14.8
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
maximum recursion depth exceeded while calling a Python ...
This means that each call to your recursive function will create a function call stack and because there is a limit of stack...
Read more >maximum recursion depth exceeded while calling a Python ...
When we run the recursion function for a large number of times, recursion error is thrown. Python has a limit on the number...
Read more >(Python) RecursionError: maximum recursion depth exceeded
The Python "RecursionError: maximum recursion depth exceeded" occurs when a function is being called so many times that the invocations exceed ...
Read more >Python RecursionError: Maximum Recursion Depth Exceeded ...
A Python RecursionError exception is raised when the execution of your program exceeds the recursion limit of the Python interpreter.
Read more >Python: Maximum Recursion Depth Exceeded [How to Fix It]
The maximum recursion depth in Python is 1000. To check it, call sys.getrecursionlimit() function. To change it, call sys.setrecursionlimit().
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s a new peewee (3.14.9) on pypi now that contains the fix.
Fantastic thank you for the fast fix @coleifer I can confirm it works! 🙌