Pycharm多模块运行服务器 [英] Pycharm multiple modules Run server

查看:22
本文介绍了Pycharm多模块运行服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在谷歌应用引擎中使用多个模块.

I'm trying to use multiple modules in google app engine.

我尝试使用这个源代码:

i try using this source code:

https://github.com/GoogleCloudPlatform/appengine-modules-helloworld-python

但我似乎无法找到从 pycharm 运行并加载所有 .yaml 的方法,因此似乎只加载了 app.yaml.

but i cant seem to find a way to run from pycharm with all the .yaml loaded, so only the app.yaml seem to load.

在尝试将代码上传到 appengine(使用 pycharm)时,我似乎无法全部上传.

also when trying to upload the code to the appengine (using pycharm) i cant seem to upload all.

有办法解决吗?

我看到了类似的问题:使用 PyCharm 中的模块运行 App Engine 开发服务器

但我想不出答案 +他没说要上传到appengine.

but no answer i could figure + he didnt talked about uploading it to the appengine.

这是日志:

"C:PyCharm 4.0.5in
unnerw.exe" C:Python27python.exe "C:/Program Files (x86)/Google/google_appengine/dev_appserver.py" --host 127.0.0.1 .
INFO     2015-04-24 17:14:31,730 sdk_update_checker.py:229] Checking for updates to the SDK.
WARNING  2015-04-24 17:14:33,382 simple_search_stub.py:1126] Could not read search indexes from c:usersishwartzappdatalocal	empappengine.pythonfortausearch_indexes
INFO     2015-04-24 17:14:33,401 api_server.py:172] Starting API server at: http://localhost:60656
INFO     2015-04-24 17:14:33,414 dispatcher.py:186] Starting module "default" running at: http://127.0.0.1:8080
INFO     2015-04-24 17:14:33,424 admin_server.py:118] Starting admin server at: http://localhost:8000

没什么奇怪的,他们只是忽略了其他模块.谢谢.

nothing strange, they just ignore the other modules. thanks.

推荐答案

FWIW,在将每个模块的 .yaml 文件相对于项目目录的位置添加到 <运行 -> 编辑配置菜单的strong>其他选项部分.

FWIW, I was able to run a multi-module project on the devserver after adding the location of each module's .yaml file relative to the project dir in the Additional options section of the Run -> Edit Configurations menu.

注意:我使用的是 PyCharm 4.0.6,它修复了PY-10675 - 你提到的类似问题的主题.

Note: I'm using PyCharm 4.0.6 which has the fix for PY-10675 - the subject of the similar question you mentioned.

您的运行日志中的这一行表明您的模块没有包含在运行配置中的 .yaml 文件,它只是使用默认设置运行:

This line in your Run log indicates you don't have the .yaml files for your modules included in the run configurations, it's just running with the default settings:

... (x86)/Google/google_appengine/dev_appserver.py" --host 127.0.0.1 .

... (x86)/Google/google_appengine/dev_appserver.py" --host 127.0.0.1 .

将这些添加到您的运行配置中:

Add these to your run configurations:

app.yaml mobile_frontend.yaml static_backend.yaml

app.yaml mobile_frontend.yaml static_backend.yaml

有了这些配置,您应该在运行日志的第一行看到类似这样的内容:

With these configs in place you should see something like this in the first line of the Run log:

... (x86)/Google/google_appengine/dev_appserver.py" --host 127.0.0.1 app.yaml mobile_frontend.yaml static_backend.yaml

... (x86)/Google/google_appengine/dev_appserver.py" --host 127.0.0.1 app.yaml mobile_frontend.yaml static_backend.yaml

我不能 100% 确定 dispatch.yaml 是否也应该包含在内(我还没有在我的项目中使用调度程序文件) - 按照运行控制台中显示的消息并在需要时尝试添加它.

I'm not 100% sure if dispatch.yaml should also be included (I didn't yet use a dispatcher file in my projects) - follow the messages displayed in the Run console and try to add it as well if needed.

但我也被困在上传阶段,因为我找不到类似上传配置的地方.JetBrains 确认为问题,跟踪为 PY-15686.

But I am stuck as well at the upload stage as I can't find a place for similar upload configs. Confirmed by JetBrains as an issue, tracked as PY-15686.

手动上传似乎是目前唯一的解决方法.

Manual uploads appear to be the only workaround for now.

这篇关于Pycharm多模块运行服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆