CommandError: 'learning_log's not a valid project name. Please make sure the name is a valid identifier
Question:
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.
Answers:
My guess is that the error is caused by the .
in the end of the project name. Tried the same and got the same error. Try to specify a different name (without a dot).
The same applies to app names, so, for example
python manage.py startapp second_app/
will give a similar error.
Just add a space after learning_log and then place the point/period ;
Ex :- django-admin.py startproject learning_log .
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.
Keep the space between learning_log
and .
:
django-admin.py startproject learning_log .
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.
My guess is that the error is caused by the .
in the end of the project name. Tried the same and got the same error. Try to specify a different name (without a dot).
The same applies to app names, so, for example
python manage.py startapp second_app/
will give a similar error.
Just add a space after learning_log and then place the point/period ;
Ex :- django-admin.py startproject learning_log .
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.
Keep the space between learning_log
and .
:
django-admin.py startproject learning_log .