Internal Server Error: /api/filter/albums/ Traceback (most recent call last): File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.ProgrammingError: can't adapt type 'Artist' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch response = self.handle_exception(exc) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception self.raise_uncaught_exception(exc) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception raise exc File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch response = handler(request, *args, **kwargs) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/generics.py", line 199, in get return self.list(request, *args, **kwargs) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/mixins.py", line 38, in list queryset = self.filter_queryset(self.get_queryset()) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/rest_framework/generics.py", line 150, in filter_queryset queryset = backend().filter_queryset(self.request, queryset, self) File "/home/matthew/Projects/django-rest-framework-datatables/rest_framework_datatables/django_filters/backends.py", line 40, in filter_queryset self.set_count_after(view, queryset.count()) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/models/query.py", line 397, in count return self.query.get_count(using=self.db) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/models/sql/query.py", line 518, in get_count number = obj.get_aggregation(using, ['__count'])['__count'] File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/models/sql/query.py", line 503, in get_aggregation result = compiler.execute_sql(SINGLE) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1152, in execute_sql cursor.execute(sql, params) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute return super().execute(sql, params) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers return executor(sql, params, many, context) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/home/matthew/.virtualenvs/django-rest-framework-datatables/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: can't adapt type 'Artist' "GET /api/filter/albums/?format=datatables&draw=4&columns%5B0%5D%5Bdata%5D=rank&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=false&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=artist_name&columns%5B1%5D%5Bname%5D=artist_name&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=8&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=true&columns%5B2%5D%5Bdata%5D=name&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=1&order%5B0%5D%5Bdir%5D=asc&start=0&length=10&search%5Bvalue%5D=&search%5Bregex%5D=false&_=1626815367588 HTTP/1.1" 500 25631