Package: python3-django-pyscss
Version: 2.0.2-8
Severity: serious
User: helm...@debian.org
Usertags: python-import

After installing python3-django-pyscss importing the module django_pyscss
into a python interpreter fails with the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/django_pyscss/__init__.py", line 1, in 
<module>
    from .compiler import DjangoScssCompiler  # NOQA
  File "/usr/lib/python3/dist-packages/django_pyscss/compiler.py", line 22, in 
<module>
    config.STATIC_URL = staticfiles_storage.url('scss/')
  File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 238, 
in inner
    self._setup()
  File "/usr/lib/python3/dist-packages/django/contrib/staticfiles/storage.py", 
line 504, in _setup
    self._wrapped = get_storage_class(settings.STATICFILES_STORAGE)()
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 56, in 
__getattr__
    self._setup(name)
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 39, in 
_setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting 
STATICFILES_STORAGE, but settings are not configured. You must either define 
the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() 
before accessing settings.

The vast majority of import failures is attributed to missing dependencies.
Often times that manifests as an ImportError or ModuleNotFoundError.
Typically, dependencies should be inserted by dh-python via ${python:Depends}
or ${python3:Depends}. Thus a missing dependency can be caused by incomplete
install_requires in setup.py. Sometimes a missing dependency of a dependency
is the cause, in such cases this bug should be reassigned.

Helmut

Reply via email to