Django-nonrel 和 Google App Engine 上的 dev_appserver.py 出现 AppConfigNotFoundError

发布于 2024-12-10 19:18:05 字数 1408 浏览 2 评论 0原文

我正在尝试清除本地数据库,如文档中所述< /a>

但当我尝试运行 dev_appserver.py --clear_datastore 命令时,我收到 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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不即不离 2024-12-17 19:18:05

您必须在命令行中将应用程序的目录指定为 dev_appserver.py。

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

一指流沙 2024-12-17 19:18:05

我通过以下方式解决了这个问题:

运行 -->调试配置 --> (右键单击)PyDev Google App Run -->新建

在“项目”下输入项目名称。

然后单击“参数”并输入 app.yaml 文件所在的路径位置。下图描述了我正在讨论的内容:

在此处输入图像描述

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

み零 2024-12-17 19:18:05

您缺少文档中所述的布尔 yes 值:

dev_appserver.py --clear_datastore=yes myapp

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

dev_appserver.py --clear_datastore=yes myapp
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文