I am trying to run appcfg.py from CMD. instead of deploying, its being edited in google chrome

前端 未结 1 397
抹茶落季
抹茶落季 2020-12-21 23:06

I installed python 2.7.13 and the google original App Engine SDK for PHP. I created my first project on google console and When I am trying to deploy the project file from c

相关标签:
1条回答
  • 2020-12-21 23:37

    you are probably running Windows and have probably wrongly associated your .py files with Google Chrome (like it is associated to .html files)

    Chrome acts as a text viewer in that case.

    Either reinstall python (to fix associations, that would be the best thing to do, python has a "repair" option when running the installation, no need to uninstall/reinstall) or remove your user registry key:

    [HKEY_CLASSES_ROOT\Python.File\shell\open\command]
    

    which must contain something wrong like:

    @="\"C:\\Programs\\chrome.exe\" \"%1\"
    

    and let system file associations take over.

    or as a final workaround, if you cannot, just use python prefix to force python execution instead of relying on file associations:

    python appcfg.py -A *project-id* update *project-folder*
    

    (python must be in the path, and appcfg.py must be in the current directory or in PYTHONPATH)

    note that the shebang #!/usr/bin/python doesn't help here (on Linux it would have helped)

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题