-
Notifications
You must be signed in to change notification settings - Fork 5
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
min() arg is an empty sequence #5
Comments
This is to address tomchristie/django-rest-raml#5 The problem is that if you try to generate RAML docs when you haven't set up any views, you get the above error (min called on an empty list). unfortunately, this PR is not very helpful since it doesn't actually surface a readable error to the user. Not sure what the best way to address this would be...
This is likely because you have not set up any views in your application yet. Make sure you have added your app to I've created a PR with the goal of making this more obvious in the future. But right now the PR only prevents the |
This is to address tomchristie/django-rest-raml#5 The problem is that if you try to generate RAML docs when you haven't set up any views, you get the above error (min called on an empty list). unfortunately, this PR is not very helpful since it doesn't actually surface a readable error to the user. Not sure what the best way to address this would be...
Believe encode/django-rest-framework#4649 is sufficient to close this for now. Should be (minimally) resolved with the 3.5.3 release. |
[27/Oct/2016 22:18:17] "GET /raml HTTP/1.1" 301 0
Internal Server Error: /raml/
Traceback (most recent call last):
File ".../lib/python3.5/site-packages/django/core/handlers/exception.py", line 39, in inner
response = get_response(request)
File ".../lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File ".../lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 30, in inner
return func(_args, *_kwds)
File ".../lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(_args, *_kwargs)
File ".../lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, _args, *_kwargs)
File "../lib/python3.5/site-packages/rest_framework/views.py", line 477, in dispatch
response = self.handle_exception(exc)
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 437, in handle_exception
self.raise_uncaught_exception(exc)
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 448, in raise_uncaught_exception
raise exc
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 474, in dispatch
response = handler(request, _args, *_kwargs)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 589, in get
schema = generator.get_schema(request)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 240, in get_schema
links = self.get_links(request)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 264, in get_links
prefix = self.determine_path_prefix(paths)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 306, in determine_path_prefix
return common_path(prefixes)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 41, in common_path
s1 = min(split_paths)
ValueError: min() arg is an empty sequence
The text was updated successfully, but these errors were encountered: