Run App Engine development server with modules in PyCharm(在 PyCharm 中运行带有模块的 App Engine 开发服务器)
问题描述
自最新版本的 Google App Engine Python SDK 以来,可以使用 模块.我有一个带有默认模块和另一个模块的 Python 应用程序.要在开发服务器中启动模块,开发服务器必须像这样运行:
Since the latest release of the Google App Engine Python SDK, it's possible to use modules. I have a Python application with a default module and another module. To start the module in the development server, the development server has to be run like this:
dev_appserver.py app.yaml othermodule.yaml
当我将 app.yaml othermodule.yaml 添加到 PyCharm 的运行/调试配置中的附加选项"中,然后运行开发服务器时,我收到以下错误消息:
When I add app.yaml othermodule.yaml to "Additional options" in the Run/Debug configuration of PyCharm and then run the development server, I get the following error message:
google.appengine.tools.devappserver2.errors.InvalidAppConfigError:."是目录,需要yaml配置文件
google.appengine.tools.devappserver2.errors.InvalidAppConfigError: "." is a directory and a yaml configuration file is required
这是因为 PyCharm 在命令末尾添加了一个点来运行开发服务器,如下所示:
This is because PyCharm adds a dot at the end of the command to run the development server, like this:
dev_appserver.py app.yaml othermodule.yaml .
是否可以删除该点,还是我必须等到 PyCharm 修复此问题?在有模块之前,没有必要这样做.
Is it possible to remove the dot, or do I have to wait until this is fixed in PyCharm? Before there were modules, there was no need for this.
推荐答案
您暂时可以通过创建一个新的运行配置来解决这个问题.选择 Python 配置,然后填写如下:
You can go around this for the time being by just creating a new Run Configuration. Chose Python configuration, then fill like this:
- 脚本:
/path/to/your/dev_appserver.py - 脚本参数:
dispatch.yaml module1.yaml module2.yaml - 工作目录:
/path/to/your/appengine/project
它对我来说就像这样工作得很好.调度程序正在正常启动,并且我在 PyCharm 中获得了与以前一样的所有日志.
It works just fine like this for me. The dispatcher is launching properly and I've got all the logs like before in PyCharm.
这篇关于在 PyCharm 中运行带有模块的 App Engine 开发服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 PyCharm 中运行带有模块的 App Engine 开发服务器
基础教程推荐
- 修改列表中的数据帧不起作用 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 包装空间模型 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
