Dear NAV users,
I just have a fresh install of NAV In Debian 7. Everything seems to be ok: Graphite is working, I can include objets, I am getting alerts, etc. Nevertheless, the Netmap app function is not working, and as soon as I enter to it, I get the following error:
AttributeError: 'QuerySet' object has no attribute 'categories_set'
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 109, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 48, in view return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in dispatch return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 123, in get context = self.get_context_data(**kwargs) File "/usr/lib/python2.7/dist-packages/nav/web/netmap/views.py", line 70, in get_context_data NetmapViewSerializer(netmap_views).data File "/usr/lib/python2.7/dist-packages/rest_framework/serializers.py", line 572, in data self._data = self.to_native(obj) File "/usr/lib/python2.7/dist-packages/nav/web/netmap/serializers.py", line 95, in to_native for view_category in obj.categories_set.all().select_related( AttributeError: 'QuerySet' object has no attribute 'categories_set'
Some help would be highly appreciated,
Best regards,
Gustavo García RedCLARA
On Tue, 6 Oct 2015 11:00:44 -0500 Gustavo Garcia Plaza gustavo.garcia@redclara.net wrote:
I just have a fresh install of NAV In Debian 7. Everything seems to be ok:
Hei there,
I'm going to assume you meant Debian 8 (Jessie), not 7 (Wheezy), based on the rest of your report.
File "/usr/lib/python2.7/dist-packages/nav/web/netmap/serializers.py", line 95, in to_native for view_category in obj.categories_set.all().select_related( AttributeError: 'QuerySet' object has no attribute 'categories_set'
Another user reported the same issue yesterday as well. The issue is that Debian Jessie ships a version of Django REST framework that isn't fully compatible with NAV 4.3.
Only a minor tweak is needed to fix this, and the patch already exists in NAV, in the branch we're working on to transition to Django 1.7. I registered the bug in the Debian Package's issue tracker at [1] and have already built and pushed a patched version of the Debian Jessie package.
Hope this helps :)
[1] https://bitbucket.org/mbrekkevold/nav-debian/issues/8/
Hi Morten,
Thank you very much, it worked!!. I am a happy NAVer now :)
Best regards,
Gustavo García RedCLARA
On 07/10/2015 3:07 a. m., Morten Brekkevold wrote:
On Tue, 6 Oct 2015 11:00:44 -0500 Gustavo Garcia Plaza gustavo.garcia@redclara.net wrote:
I just have a fresh install of NAV In Debian 7. Everything seems to be ok:
Hei there,
I'm going to assume you meant Debian 8 (Jessie), not 7 (Wheezy), based on the rest of your report.
File "/usr/lib/python2.7/dist-packages/nav/web/netmap/serializers.py", line 95, in to_native for view_category in obj.categories_set.all().select_related( AttributeError: 'QuerySet' object has no attribute 'categories_set'
Another user reported the same issue yesterday as well. The issue is that Debian Jessie ships a version of Django REST framework that isn't fully compatible with NAV 4.3.
Only a minor tweak is needed to fix this, and the patch already exists in NAV, in the branch we're working on to transition to Django 1.7. I registered the bug in the Debian Package's issue tracker at [1] and have already built and pushed a patched version of the Debian Jessie package.
Hope this helps :)