Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CommandError: 'learning_log's not a valid project name. Please make sure the name is a valid identifier

I am working on the Python Crash Course Virtual Environment (Ch. 18) project and I am running into an error.

django-admin.py startproject learning_log.

" CommandError: 'learning_log.' is not a valid project name. Please make sure the name is a valid identifier. "

With my virtual environment activated I am receiving this error when I try to start the new django project. I have done this project in the past but when I came back to run it again, I am getting this error and I don't know why. Any feedback would be appreciated.

like image 300
phast Avatar asked Dec 25 '19 15:12

phast


2 Answers

You just remove '.' at the end and run below command.

django-admin.py startproject learning_log

  • No space is required at the end of the line. As per PEP-8 guide, you should only use lower case letters, and '_'(underscore) to create a project.
  • Do not provide iphen(-) or space or other special symbols to create a project.
like image 82
Ravi Pullagurla Avatar answered Oct 24 '22 02:10

Ravi Pullagurla


Just add a space after learning_log and then place the point/period ; Ex :- django-admin.py startproject learning_log .

like image 1
Uthpraanu Avatar answered Oct 24 '22 03:10

Uthpraanu