```
AttributeError: module 'posthog.queries.sessions' has no attribute 'Sessions'
(6 additional frame(s) were not displayed)
...
  File "posthog/api/dashboard.py", line 101, in get_items
    update_dashboard_items_cache(dashboard)
  File "posthog/tasks/update_cache.py", line 73, in update_dashboard_items_cache
    update_cache_item(cache_key, cache_type, payload)
  File "posthog/tasks/update_cache.py", line 64, in update_cache_item
    result = _calculate_by_filter(filter, key, team_id, cache_type)
  File "posthog/tasks/update_cache.py", line 144, in _calculate_by_filter
    insight_class = import_from(insight_class_path[0], insight_class_path[1])
  File "posthog/tasks/update_cache.py", line 132, in import_from
    return getattr(importlib.import_module(module), name)
```
posthog/settings.py
DATABASE_URL = "postgres://{}{}{}{}:{}/{}{}".format(
        DATABASES["default"]["USER"],
        ":" + DATABASES["default"]["PASSWORD"] if DATABASES["default"]["PASSWORD"] else "",
        "@" if DATABASES["default"]["USER"] or DATABASES["default"]["PASSWORD"] else "",
        DATABASES["default"]["HOST"],
        DATABASES["default"]["PORT"],
        DATABASES["default"]["NAME"],
        ssl_configuration,
    )
else:
    raise ImproperlyConfigured(
        f'The environment vars "DATABASE_URL" or "POSTHOG_DB_NAME" are absolutely required to run this software'
    )
# 
# The last case happens when someone upgrades Heroku but doesn't have Redis installed yet. Collectstatic gets called before we can provision Redis.
if TEST or DEBUG or (len(sys.argv) > 1 and sys.argv[1] == "collectstatic"):
    REDIS_URL = os.getenv("REDIS_URL", "redis://localhost/")
else:
    REDIS_URL = os.getenv("REDIS_URL", "")
if not REDIS_URL and get_from_env("POSTHOG_REDIS_HOST", ""):
    REDIS_URL = "redis://:{}@{}:{}/".format(
        os.getenv("POSTHOG_REDIS_PASSWORD", ""),
        os.getenv("POSTHOG_REDIS_HOST", ""),
        os.getenv("POSTHOG_REDIS_PORT", "6379"),
    )
if not REDIS_URL:
    raise ImproperlyConfigured(
        "Env var REDIS_URL or POSTHOG_REDIS_HOST is absolutely required to run this software.\n"
        "If upgrading from PostHog 1.0.10 or earlier, see here: "
        "https://posthog.com/docs/deployment/upgrading-posthog#upgrading-from-before-1011"