Why are the special characters being ignored in docker-compose.yml?

I have a docker-compose.yml file and during the startup it says it couldn’t find the file it should start.

  build: dockerproducer .
  restart: always
  container_name: producer
  command: bash -c "python producersorch_core.py"

The file orch_core.py lies within the folder producers. All I get as an error is:

python: can't open file 'producersorch_core.py': [Errno 2] No such file or directory

It seems that the backslash is ignored? Escaping didn’t help.

Source: StackOverflow