I use a docker-compose based remote interpreter for a Django project. I completely reinstalled Docker and PyCharm when my previous setup failed to restart containers and often failed to connect to the `web` container.
Now things are better, but using `Run manage.py Task` (Alt+R) results in:
Failed to get real commands on module "my_app": python process died with code 1:
Traceback (most recent call last):
File "/opt/.pycharm_helpers/pycharm/_jb_manage_tasks_provider.py", line 25, in <module>
File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 19, in setup
File "/usr/local/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
File "/usr/local/lib/python3.9/site-packages/django/conf/__init__.py", line 63, in _setup
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Under "Languages & Frameworks | Django", "Settings" points to the appropriate `settings.py`, "Manage Script" point to `manage.py`. I have no environment variables set.
The "Python Interpreter" of my remote interpreter is set to the correct path inside the container. No environment variables are set their either.
I activates Docker-Compose v2 in Docker Desktop and under "Preferences | Build, Execution, Deployment | Docker | Tools".