Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dev_appserver.py Opens a Text File, Does Not Deploy

It works fine on my other computer, but after setting up Google App Engine and creating the main.py and app.yaml files, I run dev_appserver.py app.yaml in Windows command prompt and instead of deploying the app to localhost:8080 it just opens this text file, which I will shorten:

#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Convenience wrapper for starting an appengine tool."""

import os
import sys

sys_path = sys.path
try:
  sys.path = [os.path.dirname(__file__)] + sys.path

  import wrapper_util

finally:
  sys.path = sys_path

wrapper_util.reject_old_python_versions((2, 7))

_DIR_PATH = wrapper_util.get_dir_path(__file__, os.path.join('lib', 'ipaddr'))
_PATHS = wrapper_util.Paths(_DIR_PATH)

etc. etc.

What is going on here? Everything is set up identically to my other pc. It should work.

like image 850
ian-campbell Avatar asked Jul 03 '14 02:07

ian-campbell


2 Answers

SOLVED! The .py files were all set to open with idle.bat so I had to go into Control Panel\Programs\Default Programs\Set Associations and change the .py file association to python.exe. Now everything works like a charm.

like image 177
ian-campbell Avatar answered Nov 22 '22 12:11

ian-campbell


Is Python installed on this computer? What you're seeing is that Windows doesn't know that ".py" files are associated with Python.

Installing SetupTools on 64-bit Windows might provide some helpful info.

like image 40
Dave W. Smith Avatar answered Nov 22 '22 13:11

Dave W. Smith