Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

ImportError when attempting to save an empty Device #5

Closed
nemesifier opened this issue Jan 12, 2016 · 0 comments
Closed

ImportError when attempting to save an empty Device #5

nemesifier opened this issue Jan 12, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@nemesifier
Copy link
Member

How to reproduce:

  1. go to admin
  2. add new device
  3. do not fill any information and try to save

Relevant stacktrace:

  File "/var/www/django-netjsonconfig/django_netjsonconfig/models/device.py", line 46, in clean
    self.validate_netjsonconfig_backend(self.backend_instance)
  File "/home/nemesis/.virtualenvs/djnetconfig3/lib/python3.4/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/var/www/django-netjsonconfig/django_netjsonconfig/models/device.py", line 72, in backend_instance
    return self.get_backend_instance()
  File "/var/www/django-netjsonconfig/django_netjsonconfig/models/device.py", line 79, in get_backend_instance
    backend = self.backend_class
  File "/home/nemesis/.virtualenvs/djnetconfig3/lib/python3.4/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/var/www/django-netjsonconfig/django_netjsonconfig/models/device.py", line 68, in backend_class
    return import_string(self.backend)
  File "/home/nemesis/.virtualenvs/djnetconfig3/lib/python3.4/site-packages/django/utils/module_loading.py", line 18, in import_string
    six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
  File "/home/nemesis/.virtualenvs/djnetconfig3/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/home/nemesis/.virtualenvs/djnetconfig3/lib/python3.4/site-packages/django/utils/module_loading.py", line 15, in import_string
    module_path, class_name = dotted_path.rsplit('.', 1)
ImportError:  doesn't look like a module path
@nemesifier nemesifier added the bug label Jan 12, 2016
@nemesifier nemesifier self-assigned this Jan 12, 2016
@nemesifier nemesifier added this to the 0.2 milestone Jan 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant