I encountered the same issue, and in my case, it was caused by a conflict between "decouple" and "python-decouple" packages (I had installed both of them by mistake). As the latter creates a file called "decouple.py" in the installation virtual environment, finding the package of the same name, this will confuse the Django app of which of the 2 decouple reference it will consider. To fix this I had to uninstall the "decouple" package with pipenv uninstall decouple
and install the "python-decouple" package with pipenv install python-decouple
.
...
class AutoConfig(object):
"""
Autodetects the config file and type.
Parameters
----------
search_path : str, optional
Initial search path. If empty, the default search path is the
caller's path.
"""
...
# A pré-instantiated AutoConfig to improve decouple's usability
# now just import config and start using with no configuration.
config = AutoConfig()
# Helpers
...