title: Django API raises an error "No such file or directory: 'manage.py'" when requested
body: <p>This might seem like an already asked question but I have searched for an answer for a week now and got nothing.
  The problem is I have developed an API using Django which is hosted on a server. Now when I run the following command to initiate the server :</p>
  
  <pre><code>python manage.py runserver 0.0.0.0:9000
  </code></pre>
  
  <p>The server starts as usual. Its only when I send request to the server via "Postman" that I see the following error:</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: 'manage.py'
  </code></pre>
  
  <p>The strange thing is there is no error in running the server but only when I send a request to it. Also I have many more Django APIs running on the same server with same <strong>python version(Python 3.4.3)</strong> and same virtual environment (but different port) that are running just fine.</p>
  
  <p>Full error traceback :</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 15, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
      utility.execute()
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/__init__.py", line 365, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 61, in execute
      super().execute(*args, **options)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/base.py", line 335, in execute
      output = self.handle(*args, **options)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 98, in handle
      self.run(**options)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 105, in run
      autoreload.main(self.inner_run, None, options)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/utils/autoreload.py", line 317, in main
      python_reloader(wrapped_main_func, args, kwargs)
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/utils/autoreload.py", line 296, in python_reloader
      reloader_thread()
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/utils/autoreload.py", line 274, in reloader_thread
      change = fn()
    File "/home/ubuntu/py3env/lib/python3.4/site-packages/django/utils/autoreload.py", line 204, in code_changed
      stat = os.stat(filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'manage.py'
  </code></pre>
  
  <p>Things I have tried:</p>
  
  <ul>
  <li>I have tried changing the <strong>!#</strong> as suggested on various posts.</li>
  <li>I have tried using dos2unix to convert the file to unix format(server on which my API is hosted is linux based).</li>
  <li>I even have tried to create a new Django project.</li>
  <li>And yes I'm running manage.py from the correct directory.</li>
  <li><p>I have also tried making manage.py executable by :</p>
  
  <p>chmod +x manage.py</p></li>
  </ul>
  
  <p>Nothing worked for me so far. Am I missing something? </p>