ImportError: No module named ... in docker toolbar on windows

I am currently having a problem trying to set up a project on my windows device.

I have a docker dashboard that needs to run a dockerfile with a python server but on $ docker-compose up

im getting a massive loadImportError: No module named '<projects modules names>'

As the rest of the commands successfully run it on Linux, I suppose there is something to do with Windows, perhaps paths or idk (inb4 "why not use Linux").

Of course there is a possibility to use a VM, but I would like to use it only at the end.

+3


source to share


1 answer


As stupid as it may seem, I leave my decision anyway, because perhaps it helps some poor soul like me.

In my docker-compose.yml, I had a wrong mapping in volumes

:



web:
   ...
   volumes:
       - .:app/wrong-subfolder

      

This is why my local code was mapped to the wrong directory and caused the django

settings module to not be found.

0


source







All Articles