I am facing a rather strange issue. I am trying to get my django app started using the python manage.py runserver. But I get a FileNotFoundError. I have checked multiple time. The file is in the directory from where I am running the python manage.py runserver command.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line
utility.execute()
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 58, in execute
super(Command, self).execute(*args, **options)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\base.py", line 345, in execute
output = self.handle(*args, **options)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 97, in handle
self.run(**options)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 106, in run
autoreload.main(self.inner_run, None, options)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\utils\autoreload.py", line 333, in main
reloader(wrapped_main_func, args, kwargs)
File "C:\New folder (2)\Anaconda\lib\site-packages\django\utils\autoreload.py", line 299, in python_reloader
reloader_thread()
File "C:\New folder (2)\Anaconda\lib\site-packages\django\utils\autoreload.py", line 275, in reloader_thread
change = fn()
File "C:\New folder (2)\Anaconda\lib\site-packages\django\utils\autoreload.py", line 205, in code_changed
stat = os.stat(filename)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'manage.py'
Any help would be great. Thanks in advance
I found what I was doing wrong. In one one of the codes, I was changing the directory using os.chdir(location). I have made the changes, it works now.