1

Several days ago I uploaded my first sample project to Google App Engine. Now I want to update it using command "appcfg.py -A my-first-gae-project-1119 update app.yaml", however, it keeps showing the menu of appcfg.py instead of updating the project. It seems no matter what I type after "appcfg.py", it will always be neglected them just as I only typed "appcfg.py".

Can anyone help fix this?

Thanks!

I just found this guy had the same problem with me: Google App Engine appcfg.py shows the help message for every command

But it seems he doesn't fix that...

By the way, I tried both python 2.7.8 and 2.7.10. If I use version lower than 2.7.8, then there will be an encoding error when I run "appcfg.py".

Community
  • 1
  • 1
Phoenix416
  • 31
  • 5
  • Is there an error message in the output, such as "error: Unknown action: '...'" or anything like that? Is the first line "Usage: appcfg.py [options] ", or something else? (The command looks good. I tried the same arguments and argument order and it worked for me.) – Dan Sanderson Nov 10 '15 at 23:48
  • There is no any error messages. The first line is just "Usage: ...". – Phoenix416 Nov 11 '15 at 00:27
  • Hm. Which operating system are you using? Did you use the GAE SDK installer for that OS, or the .zip file? Does "appcfg.py help" print "... appcfg.py: error: Expected a single action argument." or something else? – Dan Sanderson Nov 11 '15 at 00:32
  • I am using Windows, and I'm sure I installed the right version... When I type "appcfg.py help", it still list the "Usage: ...". Actually, as long as I type "appcfg.py", then no matter what I append to it, it will only print the usage list. – Phoenix416 Nov 11 '15 at 00:35
  • Just to clarify, "appcfg.py help" prints "Usage: appcfg.py help ... appcfg.py: error: Expected a single action argument." followed by the list of possible actions, but no command line args. But it sounds like none of the args are making it to appcfg.py... – Dan Sanderson Nov 11 '15 at 00:39
  • Oh sorry, my bad. It is not like that. It prints "Usage: appcfg.py [options] " followed by a list of possible actions. No "error" part. – Phoenix416 Nov 11 '15 at 00:49
  • I also edited my question. I found a guy who had the same problem with me, and he described it quite clearly (however it seems he didn't fix that...) You can refer to the link in my question. – Phoenix416 Nov 11 '15 at 00:50
  • I'm actually not sure how the GAE Python SDK for Windows intends to set up the command path, if at all. I just tried a fresh install and didn't get appcfg.py on the command path. I can run it from C:\Program Files (x86)\Google\google_appengine\ fine. If I cd to that directory and type "appcfg.py help" I get the help message (and not the generic doc page). Maybe try giving the full path to appcfg.py, or troubleshooting the command path? If you have it set up as an alias, make sure to do whatever Windows expects to pass args to the alias (something like %* maybe?). – Dan Sanderson Nov 11 '15 at 01:02
  • Thanks but still not working... – Phoenix416 Nov 11 '15 at 01:29

2 Answers2

0

This is actually an issue affecting passing command line arguments to Python scripts in general on Windows, and is caused by a broken file association in the registry for *.py files. Most of the time this can be fixed by uninstalling Python and then re-installing (as an administrator) using the latest Python 2.7 installer.

For manual steps in fixing the registry entry there is an older question on StackOverflow with the solution.

Community
  • 1
  • 1
Adam
  • 5,697
  • 1
  • 20
  • 52
0
$ appcfg.py update main/app.yaml service1/app.yaml service2/app.yaml
Eldelshell
  • 6,683
  • 7
  • 44
  • 63