Internal Server Error: /api/items/
Traceback (most recent call last):
File "C:\python36\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\python36\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\python36\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\python36\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "C:\python36\lib\site-packages\rest_framework\viewsets.py", line 103, in view
return self.dispatch(request, *args, **kwargs)
File "C:\python36\lib\site-packages\rest_framework\views.py", line 483, in dispatch
response = self.handle_exception(exc)
File "C:\python36\lib\site-packages\rest_framework\views.py", line 443, in handle_exception
self.raise_uncaught_exception(exc)
File "C:\python36\lib\site-packages\rest_framework\views.py", line 480, in dispatch
response = handler(request, *args, **kwargs)
File "C:\python36\lib\site-packages\rest_framework\mixins.py", line 40, in list
queryset = self.filter_queryset(self.get_queryset())
File "C:\python36\lib\site-packages\rest_framework\generics.py", line 152, in filter_queryset
queryset = backend().filter_queryset(self.request, queryset, self)
File "C:\python36\lib\site-packages\django_filters\rest_framework\backends.py", line 90, in filter_queryset
filterset = self.get_filterset(request, queryset, view)
File "C:\python36\lib\site-packages\django_filters\rest_framework\backends.py", line 31, in get_filterset
filterset_class = self.get_filterset_class(view, queryset)
File "C:\python36\lib\site-packages\django_filters\rest_framework\backends.py", line 73, in get_filterset_class
class AutoFilterSet(self.filterset_base):
File "C:\python36\lib\site-packages\django_filters\filterset.py", line 71, in __new__
new_class.base_filters = new_class.get_filters()
File "C:\python36\lib\site-packages\django_filters\filterset.py", line 330, in get_filters
field = get_model_field(cls._meta.model, field_name)
File "C:\python36\lib\site-packages\django_filters\utils.py", line 141, in get_model_field
fields = get_field_parts(model, field_name)
File "C:\python36\lib\site-packages\django_filters\utils.py", line 157, in get_field_parts
parts = field_name.split(LOOKUP_SEP)
AttributeError: 'tuple' object has no attribute 'split'
[24/Sep/2018 13:20:36] "GET /api/items/ HTTP/1.1" 500 127771
AttributeError at /api/items/
'tuple' object has no attribute 'split'
Request Method: GET
Request URL: http://127.0.0.1:8000/api/items/
Django Version: 2.1.1
Exception Type: AttributeError
Exception Value:
'tuple' object has no attribute 'split'
Exception Location: C:\python36\lib\site-packages\django_filters\utils.py in get_field_parts, line 157
Python Executable: C:\python36\python.exe
Python Version: 3.6.5