spender-sandbox / cuckoo-modified

Modified edition of cuckoo
394 stars 178 forks source link

ImportError: cannot import name patterns #323

Open icepaule opened 8 years ago

icepaule commented 8 years ago

Hello world,

some help would be highly appreciated. I did a fresh install and even the "pip install requirements" worked just fine.

But unfortunately I'm getting below error message while trying to run the web frontend.

Any ideas out there on how to solve this issue?

Thanks a lot

Marcus

root@Cuckoo:/opt/cuckoo-modified/web# ./manage.py runserver 0.0.0.0:8080 Performing system checks...

Unhandled exception in thread started by <function wrapper at 0x7fa40c5f1500> 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/cuckoo-modified/web/web/urls.py", line 5, in from django.conf.urls import patterns, include, url ImportError: cannot import name patterns

spender-sandbox commented 8 years ago

Are you not running the latest version?

https://github.com/spender-sandbox/cuckoo-modified/blob/master/web/web/urls.py#L5

-Brad

icepaule commented 8 years ago

Hi Brad, WOW, what a fast reply. Thanks a lot...!!!

I did a "git clone" in the main cuckoo-modified dir before. But anyway I know copied it manually. Looked much better, but throughs the next issues now while accessing the web frontend via the browser.

Traceback: File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1. resolver_match = resolver.resolve(request.path_info) File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  2. for pattern in self.url_patterns: File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  3. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  4. self._urlconf_module = import_module(self.urlconf_name) File "/home/cuckoo/.local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  5. import(name) File "/opt/cuckoo-modified/web/web/urls.py" in
  6. url(r"^file/(?P\w+)/(?P\d+)/(?P\w+)/$", analysis_views.file, name='file'),

Exception Type: AttributeError at / Exception Value: 'module' object has no attribute 'file'

Nwinternights commented 8 years ago

I had similar problem with django 1.10. Try downgrade to 1.9.6 with pip install django==1.9.6

Il 17 ott 2016 20:03, "icepaule" notifications@github.com ha scritto:

Hi Brad, WOW, what a fast reply. Thanks a lot...!!!

I did a "git clone" in the main cuckoo-modified dir before. But anyway I know copied it manually. Looked much better, but throughs the next issues now while accessing the web frontend via the browser.

Traceback: File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1. resolver_match = resolver.resolve(request.path_info) File "/home/cuckoo/.local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  2. for pattern in self.url_patterns: File "/home/cuckoo/.local/lib/ python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  3. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/cuckoo/.local/lib/ python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  4. self._urlconf_module = import_module(self.urlconf_name) File "/home/cuckoo/.local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  5. import(name) File "/opt/cuckoo-modified/web/web/urls.py" in
  6. url(r"^file/(?P\w+)/(?P\d+)/(?P\w+)/$", analysis_views.file, name='file'),

Exception Type: AttributeError at / Exception Value: 'module' object has no attribute 'file'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spender-sandbox/cuckoo-modified/issues/323#issuecomment-254285090, or mute the thread https://github.com/notifications/unsubscribe-auth/ARXnqengDuoZGUzvVul3B31_tU1ySGZZks5q07h5gaJpZM4KY5C9 .