openwisp / docker-openwisp

OpenWISP in docker. For production usage we recommend using the ansible-openwisp2 role.
https://openwisp.io/docs/dev/docker/
BSD 3-Clause "New" or "Revised" License
149 stars 75 forks source link

[bug] Celery images fail without defaults #261

Closed systemcrash closed 1 month ago

systemcrash commented 1 year ago

Unless both USE_OPENWISP_CELERY_NETWORK and USE_OPENWISP_CELERY_FIRMWARE are set.

images are latest

Connection with redis established.
Traceback (most recent call last):
  File "/opt/openwisp/manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 386, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 87, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 74, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 183, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/openwisp/openwisp/__init__.py", line 3, in <module>
    from .celery import app as celery_app
  File "/opt/openwisp/openwisp/celery.py", line 29, in <module>
    if env_bool(os.environ.get('USE_OPENWISP_FIRMWARE')) and env_bool(
  File "/opt/openwisp/openwisp/utils.py", line 30, in env_bool
    return env.lower() in ['true', 'yes']
AttributeError: 'NoneType' object has no attribute 'lower'
nemesifier commented 1 month ago

Should be fixed on latest master, please reopen if that's not the case.