2

I'm trying to clear my local db like explained in the docs

But when I try and run the dev_appserver.py --clear_datastore command I get google.appengine.tools.dev_appserver.AppConfigNotFoundError

dev_appserver.py --clear_datastore dennys
Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 76, in <module>
    run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 72, in run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 687, in <module>
    sys.exit(main(sys.argv))
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 575, in main
    appinfo, matcher = dev_appserver.LoadAppConfig(root_path, {})
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 4359, in LoadAppConfig
    raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
b-ryce
  • 5,752
  • 7
  • 49
  • 79

3 Answers3

2

You have to specify the directory of your application in the command line to dev_appserver.py.

Moishe Lettvin
  • 8,462
  • 1
  • 26
  • 40
  • as far as I can tell I am. I'm in the directory that holds my app, and I'm running: "dev_appserver.py --clear_datastore dennys" Where "dennys" is the name of my app – b-ryce Oct 19 '11 at 16:32
  • dev_appserver is looking for the path to your app, not just its name. I suspect you're running dev_appserver from the google_appengine directory; it's unlikely your project is in a subdirectory of that directory. – Moishe Lettvin Oct 19 '11 at 16:36
  • I really appreciate your help Moishe. I'm currently in my project directory: "/Users/bryce/Documents/Aptana Studio 3 Workspace/DennysBE " and my project is in the directory "/Users/bryce/Documents/Aptana Studio 3 Workspace/DennysBE/dennys ". So the path is the same as the project name. Should I be somewhere else to run the dev_appserver command? – b-ryce Oct 19 '11 at 16:44
  • Try: "/path-to-dev_appserver/dev_appserver.py --clear_datastore /Users/bryce/Documents/Aptana Studio 3 Workspace/DennysBE/dennys" – Moishe Lettvin Oct 19 '11 at 16:46
  • The command ran fine, but when I started up the server using "python manage.py runserver" and go into the admin for the site, all the models are still there... – b-ryce Oct 19 '11 at 16:54
  • Maybe you can modify manage.py to pass the --clear_datastore command to dev_appserver. – Moishe Lettvin Oct 19 '11 at 17:21
1

I solved this problem by going to:

Run --> Debug Configurations --> (right click) PyDev Google App Run --> New

Type the project name under "Project".

Then click on "Arguments" and put the path location of where your app.yaml file is. The picture below describes what I'm talking about:

enter image description here

Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
0

You are missing the boolean yes value as stated in the docs:

dev_appserver.py --clear_datastore=yes myapp
Thomas Chille
  • 156
  • 3
  • 8