django-survey
django-survey copied to clipboard
RecursionError: maximum recursion depth exceeded while calling a Python object
Python 3.8.5
Django 3.1.4
Running python3 manage.py runserver
returns me this error
Hello, thank you for opening the issue. Can you use text instead of image so we have the full stacktrace and it's searchable and readable by text to speech software ? :)
Got the same issue. When I remove it from the urlpatterns, it stops.
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/commands/check.py", line 76, in handle
self.check(
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/management/base.py", line 487, in check
all_issues = checks.run_checks(
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/urls/resolvers.py", line 481, in check
messages.extend(check_resolver(pattern))
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
...
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/urls/resolvers.py", line 481, in check
messages.extend(check_resolver(pattern))
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/urls/resolvers.py", line 481, in check
messages.extend(check_resolver(pattern))
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/urls/resolvers.py", line 482, in check
messages.extend(self._check_custom_error_handlers())
File "/home/ron/Projects/survey/survey_env/lib/python3.8/site-packages/django/urls/resolvers.py", line 500, in _check_custom_error_handlers
signature = inspect.signature(handler)
File "/usr/lib/python3.8/inspect.py", line 3105, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "/usr/lib/python3.8/inspect.py", line 2854, in from_callable
return _signature_from_callable(obj, sigcls=cls,
File "/usr/lib/python3.8/inspect.py", line 2304, in _signature_from_callable
return _signature_from_function(sigcls, obj,
File "/usr/lib/python3.8/inspect.py", line 2168, in _signature_from_function
parameters.append(Parameter(name, annotation=annotation,
File "/usr/lib/python3.8/inspect.py", line 2491, in __init__
self._kind = _ParameterKind(kind)
File "/usr/lib/python3.8/enum.py", line 339, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.8/enum.py", line 635, in __new__
if type(value) is cls:
RecursionError: maximum recursion depth exceeded while calling a Python object
I had the same problem an hour ago when I started looking at the django-survey package.
I think by naming your django app 'survey', you will include the survey.urls recursively, without breaking the loop.
I'm not yet sure what the proper way is to use the survey package, but I now have the impression that you shouldn't name your app 'survey', and maybe should clone/copy the 'survey' folder from the repository.
But this could be a very noob impression. And the getting-started could be a bit more monkey-proof for me. The getting started could include the steps needed to create the example django project and app(s), and copy/clone (parts of) the survey repo in your code.
It should work like a standard Django app (but maybe it isn't right now).