thenewboston-blockchain/Bank

Fix django.core.exceptions.ImproperlyConfigured

buckyroberts opened this issue · 0 comments

When triggering a crawl from client got this error:

Traceback (most recent call last):
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/playground/crawl.py", line 67, in <module>
    run(nid_key_name=k, ip=v, send_to_node=True)
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/playground/crawl.py", line 34, in run
    write_json(
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/thenewboston/utils/files.py", line 36, in write_json
    default_storage.delete(file)
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/django/utils/functional.py", line 240, in inner
    self._setup()
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/django/core/files/storage.py", line 364, in _setup
    self._wrapped = get_storage_class()()
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/django/core/files/storage.py", line 359, in get_storage_class
    return import_string(import_path or settings.DEFAULT_FILE_STORAGE)
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 83, in __getattr__
    self._setup(name)
  File "/Users/bucky/Desktop/Projects/thenewboston-playground/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 64, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_FILE_STORAGE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
crawl_last_completed: None