Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Could not import 'rest_framework_filters.backends.DjangoFilterBackend'

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Could not import 'rest_framework_filters.backends.DjangoFilterBackend'


Chronological Thread 
  • From: Antoine Delvaux <>
  • To:
  • Cc:
  • Subject: Re: [perfsonar-user] Could not import 'rest_framework_filters.backends.DjangoFilterBackend'
  • Date: Sun, 5 Aug 2018 20:11:13 +0000
  • Ironport-phdr: 9a23:0CZYVhIY7qTLf237GNmcpTZWNBhigK39O0sv0rFitYgfKPvxwZ3uMQTl6Ol3ixeRBMOHs6wC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwRFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhzsIODAk8G/YiMJ+gq1YrhKvuRJxxJXZYJ2MNPp7Yq/dfc8WSGhHU81MVyJBGIS8b44XAucdO+ZYs479p1oIrRSgGAKiCv3gyjtWhnDswK073PkqHAbc0wwmA9IOt3XUrNPrO6sITO+60q3IzSvZYPNL1jbw843IfQonof2WRbJwdsvQyU81GAPDlFmQsYjlMiqT2+8QvWab6O9gWviui24hswxxoz6vxtsyhYnTgIIa1EzE+TtjzIkrONK4VUh2asOnHptIryyWKZd6Tt8/T2xtuys21r4LtJu+cSQXypkqyRvSZ+Gaf4SQ/x7uVOmcLS1liH57d7+znQu+/VSvx+HmSMW531hHoyxYmdfWrH8NzQbc6s2fR/t94Eih3TGP2hjI5e5aO0A0iK7bJIQ7zr41jJUTt17PHjfxmET3iq+ZbEMk9vKw6+Tjernmp5mcOJFoigzmLKgihtCzDfk9PwUNQ2SW+uGx2bj+8UD7TrhHi+A6nrTBvJDfP8sbp6q5AwFP0oYk7hayFy2p0NIEnXkALVJFfgyIg5L0NF7QJPD4E+2wg0mjkTpwwvDJJLvhDo/VLnjEkbbhe6xy60hGxAorydBT/4hUBa0ZIPLvRk/xs8TVDgcnPAyuzebnE9J91oUEVmKVG6OZLbjSvkGS5u80J+mMZZQVuCrmK/Q7/fLujHk5mUMDcqmz25sYdmy4Eup8L0qHfHXsn4RJLGERowBrTPD2kEbQFnlXZm2uROQ94C02EoSrEd2FS4ywx6eQ2T+yWYZXaWZBBF7LCXryeZ6DXf4WLT+JL9UyrjtRW6jnVIYn2jmrvQ7+jad7KfDT/DEf85nqh/Zv4OiGvBcu8j1yAoyx3mWTRnxk1jcBQSMx3aZy50BwzkmKzLhQhvVeU8RU9fVAVEEiMciPnKRBF9nuV1eZLZ+yQ1G8T4D+DA==

Hello Frank,

It seems a newer python-djangorestframework-filters slipped into our 4.0
repository when it should have stayed in the 4.1-beta repository. It might
cause the problem you're experiencing.

Can you please double check which version of
python-djangorestframework-filters you have installed? This can be seen
through `apt-cache show python-djangorestframework-filters` If you see you
have version 0.10.2-2 installed, it is the problem.

In that case, you need to downgrade to version 0.6.0-2 which is now correctly
present in our repository. You should be able to do that through the
following commands:

apt-get purge python-djangorestframework-filters
apt-get install perfsonar-toolkit

A few other packages will get uninstalled at the same time, it's normal.
You'll also be asked if you want to delete the esmond database during this
re-installation, it safe to answer 'yes' as it will be recreated anew.

Let us know how it goes,

Thanks,

Antoine.

> Le 3 août 2018 à 18:53,
>
> a écrit :
>
> Hello all,
>
> I have installed pS 4.0 on Ubuntu 16.04. Running fine except getting an
> internal server error. The esmond is not running properly.
>
> Anyone can point out a fix if ever experienced this? Thanks!
>
> Regards,
> Frank
>
> Below is from the django log.
>
> ImportError: Could not import
> 'rest_framework_filters.backends.DjangoFilterBackend' for API setting
> 'DEFAULT_FILTER_BACKENDS'. ImportError: cannot import name rest_framework.
>
> 2018-08-03 13:31:42,789 [ERROR]
> /usr/lib/python2.7/dist-packages/django/core/handlers/base.py: Internal
> Server
> Error: /esmond/perfsonar/archive/
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line
> 119, in get_response
> resolver_match = resolver.resolve(request.path_info)
> File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
> 365, in resolve
> for pattern in self.url_patterns:
> File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
> 401, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
> File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
> 395, in urlconf_module
> self._urlconf_module = import_module(self.urlconf_name)
> File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> File "/usr/lib/python2.7/dist-packages/esmond/urls.py", line 10, in
> <module>
> from esmond.api.api_v2 import (
> File "/usr/lib/python2.7/dist-packages/esmond/api/api_v2.py", line 18, in
> <module>
> from rest_framework import (viewsets, serializers, status,
> File "/usr/lib/python2.7/dist-packages/rest_framework/viewsets.py", line
> 26,
> in <module>
> from rest_framework import generics, mixins, views
> File "/usr/lib/python2.7/dist-packages/rest_framework/generics.py", line
> 25,
> in <module>
> class GenericAPIView(views.APIView):
> File "/usr/lib/python2.7/dist-packages/rest_framework/generics.py", line
> 44,
> in GenericAPIView
> filter_backends = api_settings.DEFAULT_FILTER_BACKENDS
> File "/usr/lib/python2.7/dist-packages/rest_framework/settings.py", line
> 205, in __getattr__
> val = perform_import(val, attr)
> File "/usr/lib/python2.7/dist-packages/rest_framework/settings.py", line
> 150, in perform_import
> return [import_from_string(item, setting_name) for item in val]
> File "/usr/lib/python2.7/dist-packages/rest_framework/settings.py", line
> 166, in import_from_string
> raise ImportError(msg)
> ImportError: Could not import
> 'rest_framework_filters.backends.DjangoFilterBackend' for API setting
> 'DEFAULT_FILTER_BACKENDS'. ImportError: cannot import name rest_framework.
> --
> To unsubscribe from this list:
> https://lists.internet2.edu/sympa/signoff/perfsonar-user




Archive powered by MHonArc 2.6.19.

Top of Page