getting errorr while running django server - django runserver maximum recursion depth exceeded

Please do not post images of stack dumps. They can’t be searched or quoted for further discussion and are not readable on all devices. Should you need to do this in the future, please copy/past the text of the dump.

Try manage.py check to see if there’s an error message there.

Also describe the general structure of your project.

  • Is it one application or many?
  • What third party libraries are you using?
  • Was it working at any point prior to this?
    • If so, what were the most recent changes made?
  • What version of Django?

okay thanks, noted the suggestion
here is the list of errors I am getting -
File “C:\Users\manushree\AppData\Local\Programs\Python\Python39\lib\inspect.py”, line 2330, in _signature_from_callable
return _signature_from_function(sigcls, obj,
File “C:\Users\manushree\AppData\Local\Programs\Python\Python39\lib\inspect.py”, line 2194, in _signature_from_function
parameters.append(Parameter(name, annotation=annotation,
File “C:\Users\manushree\AppData\Local\Programs\Python\Python39\lib\inspect.py”, line 2517, in init
self._kind = _ParameterKind(kind)
File “C:\Users\manushree\AppData\Local\Programs\Python\Python39\lib\enum.py”, line 384, in call
return cls.new(cls, value)
File “C:\Users\manushree\AppData\Local\Programs\Python\Python39\lib\enum.py”, line 674, in new
if type(value) is cls:
RecursionError: maximum recursion depth exceeded while calling a Python object

  • Is it one application or many? - one
  • What third party libraries are you using? - not any
  • Was it working at any point prior to this? - yes
    • If so, what were the most recent changes made? - …wrote classes in model.py
  • What version of Django? - 3.2.6

plz note : I am getting the same error while running - python manage.py runserver

If you have only 1 application and 1 models.py file, please post the contents of your models.py and add a comment before the area where you made changes.

(When posting code here, enclose it between lines of three backtick - ` characters. This means you’ll have a line of ```, then your models.py file, then another line of ```. This forces the forum software to keep your code properly formatted, which is important with python.)
example:

# The line above this is ```
def func():
    return 
#The line after this is ```

Since the recursion is happening at the URL level you might have included the app.url within itself

core/urls.py

path(" ",include("core.urls"))

instead of

path(" ",include("app.urls")
1 Like

This was the exact fix to my problem. Thank you!