AppConfigNotFoundError for dev_appserver.py on Django-nonrel and Google App Engine

本小妞迷上赌 提交于 2019-12-11 03:52:14

问题


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

回答1:


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




回答2:


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:




回答3:


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

dev_appserver.py --clear_datastore=yes myapp


来源:https://stackoverflow.com/questions/7824422/appconfignotfounderror-for-dev-appserver-py-on-django-nonrel-and-google-app-engi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!