Pycharm multiple modules Run server

2019-01-29 04:23发布

问题:

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

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.

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

is there a way to solve it?

i saw similar question : Run App Engine development server with modules in PyCharm

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

this are the logs :

"C:\PyCharm 4.0.5\bin\runnerw.exe" C:\Python27\python.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:\users\ishwartz\appdata\local\temp\appengine.pythonfortau\search_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.

回答1:

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.

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

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 .

Add these to your run configurations:

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

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.

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.