openwisp / django-netjsongraph

Network Topology Visualizer & Network Topology Collector
MIT License
141 stars 64 forks source link

Requested setting NETJSONGRAPH_PARSERS, but settings are not configured. #11

Closed Germano0 closed 7 years ago

Germano0 commented 8 years ago

I am packaging django-netjsongraph 0.2.1 into a RPM file to start a process that will bring it into Fedora repositories. During RPM creation process, I obtained the following errors

[last messages]
Installed /home/user/rpmbuild/BUILD/django-netjsongraph-0.2.1/.eggs/Django-1.10-py3.5.egg
running egg_info
writing dependency_links to django_netjsongraph.egg-info/dependency_links.txt
writing requirements to django_netjsongraph.egg-info/requires.txt
writing django_netjsongraph.egg-info/PKG-INFO
writing top-level names to django_netjsongraph.egg-info/top_level.txt
reading manifest file 'django_netjsongraph.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.swp' found under directory '*'
warning: no previously-included files matching '__pycache__' found under directory '*'
writing manifest file 'django_netjsongraph.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    'Programming Language :: Python :: 3.4',
  File "/usr/lib64/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 159, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 140, in with_project_on_sys_path
    func()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 180, in run_tests
    testRunner=self._resolve_as_ep(self.test_runner),
  File "/usr/lib64/python3.5/unittest/main.py", line 93, in __init__
    self.parseArgs(argv)
  File "/usr/lib64/python3.5/unittest/main.py", line 123, in parseArgs
    self._do_discovery([])
  File "/usr/lib64/python3.5/unittest/main.py", line 228, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/usr/lib64/python3.5/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/usr/lib64/python3.5/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/usr/lib64/python3.5/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 38, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib64/python3.5/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/home/user/rpmbuild/BUILD/django-netjsongraph-0.2.1/django_netjsongraph/settings.py", line 11, in <module>
    PARSERS = DEFAULT_PARSERS + getattr(settings, 'NETJSONGRAPH_PARSERS', [])
  File "/home/user/rpmbuild/BUILD/django-netjsongraph-0.2.1/.eggs/Django-1.10-py3.5.egg/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/home/user/rpmbuild/BUILD/django-netjsongraph-0.2.1/.eggs/Django-1.10-py3.5.egg/django/conf/__init__.py", line 39, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting NETJSONGRAPH_PARSERS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
errore: Stato d'uscita errato da /var/tmp/rpm-tmp.yUBk60 (%check)

Errori di compilazione RPM:
    Stato d'uscita errato da /var/tmp/rpm-tmp.yUBk60 (%check)
nemesifier commented 7 years ago

@Germano0 can I close this issue?

Germano0 commented 7 years ago

Yes we can close it since I am no longer experiencing this problem