GAE Python : error: too few arguments

GAE Python : error: too few arguments

I think I have found the real problem behind this error.

Tried putting some print statements in the file and found that what ever argument we are giving is not being passed and hence the error. On googling came across this SO post which explains the problem. On doing that change the following command worked flawlessly 😀 app.yaml

Quoting that SO answer for easier reference:

I think I solved this. For some reason there is a SECOND place in the registry (besides that shown by the file associations stored in HKEY_CLASSES_ROOTPython.Fileshellopencommand):

@=C:\Python25\python.exe %1 %*

This seems to be the controlling setting on my system. The registry setting above adds the %* to pass all arguments to python.exe (it was missing in my registry for some reason).

You just need to execute the with path to app.yaml in the command itself, as suggested in comments.

GAE Python : error: too few arguments

I think OP couldve identified a potential issue when describing multiple Python installations.

If I dont specify which Python installation (I thought I only had one…), then, it fails:

C:Python27>C:Program Files (x86)GoogleCloud C:usersjessminedocumentsttbtamerapp.yaml
usage: [-h] [-A APP_ID] [--host HOST] [--port PORT]
...etc... error: too few arguments

But if I specify which Python to use by invoking Python first, @ C:Python27python.exe, then it works:

C:Python27>C:Python27python.exe C:Program Files (x86)GoogleCloud C:usersjessminedocumentsttbtamerapp.yaml
INFO     2016-11-18 10:09:14,299] Skipping SDK update check.

Anyway since I dont think I have other Python installations on my computer, then I may be misinterpreting the difference here. But for me, the fix is to explicitly invoke python.exe.

(And to be clear, I know about putting the Python.exe location into %PATH%, but I expected that if it wasnt there, that the error wouldve been something like is not recognized as an internal or external command, rather than executing and printing a Python error….)


After changing the associate a file type or protocol with a specific program (example here) for *.py to explicitly use C:Python27python.exe , then I no longer needed to manually invoke C:Python27python.exe in my cmd; i.e. my first example worked correctly :

C:Program Files (x86)GoogleCloud SDKgoogle-cloud-sdkbin> C:usersjessminedocumentsttbtamerapp.yaml
INFO     2016-11-18 10:33:50,269] Skipping SDK update check.

Leave a Reply

Your email address will not be published. Required fields are marked *