rubenespadas / DionaeaFR

Dionaea Front Web
66 stars 27 forks source link

AttributeError: 'module' object has no attribute 'IPAddressField' #26

Closed affvei closed 8 years ago

affvei commented 9 years ago

this happen when I try to run python manage.py runserver 0.0.0.0:8000

azharabdullah commented 8 years ago

I face the same problem.

Hostname:/opt/DionaeaFR$ sudo python manage.py runserver 0.0.0.0:8000 Performing system checks...

Unhandled exception in thread started by <function wrapper at 0xa604d84> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper fn(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run self.check(display_num_errors=True) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config return check_resolver(resolver) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver for pattern in resolver.url_patterns: File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/opt/DionaeaFR/DionaeaFR/urls.py", line 4, in from Web.views.connection import connectionIndex, connectionDetail File "/opt/DionaeaFR/Web/views/connection.py", line 21, in from Web.forms.connection import ConnectionFilterForm File "/opt/DionaeaFR/Web/forms/connection.py", line 45, in class ConnectionFilterForm(forms.Form): File "/opt/DionaeaFR/Web/forms/connection.py", line 90, in ConnectionFilterForm remote_host = forms.IPAddressField( AttributeError: 'module' object has no attribute 'IPAddressField'

azharabdullah commented 8 years ago

Solve it..

need to use Django version 1.4.2 sudo pip install Django==1.4.2

affvei commented 8 years ago

Thank you

gregtampa commented 8 years ago

A quick Google showed django.utils.html only exists in Django 1.5 and above. downgrading to 1.4.2 results in root@sensor:/tmp/DionaeaFR# python manage.py runserver 0.0.0.0:8000 Error: cannot import name format_html

mragusa commented 8 years ago

Hello,

When running the latest DJango version, I encounter the following issue:

python manage.py runserver 0.0.0.0:10000

Performing system checks...

Unhandled exception in thread started by <function wrapper at 0x30555f0> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper fn(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 121, in inner_run self.check(display_num_errors=True) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 374, in check include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 361, in _run_checks return checks.run_checks(kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 14, in check_url_config return check_resolver(resolver) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 24, in check_resolver for pattern in resolver.url_patterns: File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 313, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 306, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import**(name) File "/opt/DionaeaFR/DionaeaFR/DionaeaFR/urls.py", line 5, in from Web.views.connection import connectionIndex, connectionDetail File "/opt/DionaeaFR/DionaeaFR/Web/views/connection.py", line 21, in from Web.forms.connection import ConnectionFilterForm File "/opt/DionaeaFR/DionaeaFR/Web/forms/connection.py", line 45, in class ConnectionFilterForm(forms.Form): File "/opt/DionaeaFR/DionaeaFR/Web/forms/connection.py", line 90, in ConnectionFilterForm remote_host = forms.IPAddressField( AttributeError: 'module' object has no attribute 'IPAddressField'

Does anyone know a better work around?