Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Starting Django with docker unexpected character

I'm trying to start up this Project on my Mac https://github.com/realsuayip/django-sozluk It works on my Windows machine, but I got this Error on my Mac:

unexpected character "." in variable name near "127.0.0.1 192.168.2.253\nDJANGO_SETTINGS_MODULE=djdict.settings_prod\n\n\nSQL_ENGINE=django.db.backends.postgresql\nSQL_PORT=5432\nDATABASE=postgres\nSQL_HOST=db\n\nSQL_DATABASE=db_dictionary\nSQL_USER=db_dictionary_user\nSQL_PASSWORD=db_dictionary_password\n\n\nEMAIL_HOST=eh\nEMAIL_PORT=587\nEMAIL_HOST_USER=eh_usr\nEMAIL_HOST_PASSWORD=pw" furkan@MacBook-Air-von-Furkan gs %

Any help would be much appreciated!

over 4 years ago · Santiago Trujillo
6 answers
Answer question

0

Turning off the "Use Docker Compose V2" flag in the settings did it for me.

over 4 years ago · Santiago Trujillo Report

0

(Sorry about the answer - I don't yet have the rep to comment)

Just want to add a note on to the answer by D.Mo - I had the same error this morning, and adding quotes around the values in my .env file did seem to resolve the issue.

Though I then noticed that in the documentation for these env files, Docker mentions

There is no special handling of quotation marks. This means that they are part of the VAL.

Just wanted to point that out in case anyone ran into issues with this.

I will likely just keep this change locally until others in my team experience the same problem - unless someone can confirm that the ENV values should now have ""s around them.

FWIW I could not find a way to disable Docker Compose V2 (I'm on Arch, Docker v20.10.9) - docker-compose disable-v2 isn't a valid command for me (see here for what I assume is the (imo silly) reason).


Edit - I ended up reverting to a previous version of docker-compose as the constant workarounds I had to implement weren't fun. I did so after seeing this - I ended up looking around yay -U /var/cache/pacman/pkg/docker-compose- and tab-complete gave me a list of cached versions. I went with 1.29.2-1 and things have been working perfectly again since then. Will just have to see what happens in future updates etc.

over 4 years ago · Santiago Trujillo Report

0

I had a similar problem with a docker container. It probably appears after a system update under my linux. I can't say anything about the reason, but try following:

Quote the variable values in file ".env" of the Project, such as:

DEBUG=0
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS="localhost 127.0.0.1 192.168.2.253"
DJANGO_SETTINGS_MODULE="djdict.settings_prod"


SQL_ENGINE="django.db.backends.postgresql"

# ...

And try again

over 4 years ago · Santiago Trujillo Report

0

For me running docker-compose disable-v2 fixed the issue

over 4 years ago · Santiago Trujillo Report

0

For latest mac M1. Use the UI to disable

Use Docker Compose V2

or in terminal docker-compose disable-v2

over 4 years ago · Santiago Trujillo Report

0

Look at the "Use Docker Compose V2" option. It seems it's ON now

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!