Patrowl / PatrowlHears

PatrowlHears - Vulnerability Intelligence Center / Exploits
https://patrowlhears.io
GNU Affero General Public License v3.0
159 stars 52 forks source link

Unable to kickstart with Docker #37

Closed mrn42 closed 3 years ago

mrn42 commented 3 years ago

Hi team,

When following instructions, i have the following error with a simple docker-compose up: TypeError: 'Meta.fields' must not contain non-model field names: search, monitored, exploit_countgt, exploit_count__gte, exploit_countlt, exploit_count__lte

It seems that the docker is not mounting properly, I tried to give more resources to the docker daemon but nothing changes.

Thanks

MaKyOtOx commented 3 years ago

Hi Yes I've reproduced the error

patrowlhears-django |     from vulns import apis as vulns_apis
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/vulns/apis.py", line 19, in <module>
patrowlhears-django |     from .serializers import (
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/vulns/serializers.py", line 109, in <module>
patrowlhears-django |     class VulnFilter(FilterSet):
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/env/lib/python3.7/site-packages/django_filters/filterset.py", line 71, in __new__
patrowlhears-django |     new_class.base_filters = new_class.get_filters()
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/env/lib/python3.7/site-packages/django_filters/filterset.py", line 360, in get_filters
patrowlhears-django |     % ', '.join(undefined)
patrowlhears-django | TypeError: 'Meta.fields' must not contain non-model field names: search, monitored, exploit_count__gt, exploit_count__gte, exploit_count__lt, exploit_count__lte
MaKyOtOx commented 3 years ago

This was caused by the django-filters upgrade to 2.4.0 PatrowlHears v1.0.3 released

mrn42 commented 3 years ago

@MaKyOtOx, thanks for the quick reply.

I observe the same behaviour, see below:

FFF:PatrowlHears myuser$ cat VERSION 
1.0.3 // Community Edition

FFF:PatrowlHears myuser$ docker-compose up
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/backend_app/urls.py", line 19, in <module>
patrowlhears-django |     from vulns import apis as vulns_apis
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/vulns/apis.py", line 19, in <module>
patrowlhears-django |     from .serializers import (
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/vulns/serializers.py", line 109, in <module>
patrowlhears-django |     class VulnFilter(FilterSet):
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/env/lib/python3.7/site-packages/django_filters/filterset.py", line 71, in __new__
patrowlhears-django |     new_class.base_filters = new_class.get_filters()
patrowlhears-django |   File "/opt/patrowl-hears/backend_app/env/lib/python3.7/site-packages/django_filters/filterset.py", line 360, in get_filters
patrowlhears-django |     % ', '.join(undefined)
patrowlhears-django | TypeError: 'Meta.fields' must not contain non-model field names: search, monitored, exploit_count__gt, exploit_count__gte, exploit_count__lt, exploit_count__lte
MaKyOtOx commented 3 years ago

Humm. Could you please try to rebuild the docker image ?

mrn42 commented 3 years ago

Fixed by pruning docker, must be the cache, thanks!