7
votes

I have GWT app, which is deployed on GAE (Java). I'm trying to download data from App Engine datastore using appcfg.py . I did all the setup according to http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/ .

GAE Python SDK version is 1.4.3
Python version is 2.5.4

appcfg.py is on my PATH. When I run appcfg.py on the command-line, I get the "help" message. But the problem is that no matter which command I use, it always returns the help message. I have not been able to run any command using appcfg.py.

It doesn't give any specific error message no matter what arguments I give. My app is using Google Accounts authentication, but I don't think it even gets to the point of authentication.

I'm able to use the Java appcfg (for other actions like rollback) without any problem. But the Python version simply refuses to work for all commands.

I've tried different formats like:

appcfg.py create_bulkloader_config --url=http://myappid.appspot.com/remote_api --application=myappid --filename=config.yml


appcfg.py create_bulkloader_config --filename=bulkloader.yaml --url=http://myappid.appspot.com/remote_api 


appcfg.py --filename=bulkloader.yaml --url=http://myappid.appspot.com/remote_api create_bulkloader_config 

All give me the same help message:

Usage: appcfg.py [options]

Action must be one of:
create_bulkloader_config: Create a bulkloader.yaml from a running application.
cron_info: Display information about cron jobs.
download_app: Download a previously-uploaded app.
download_data: Download entities from datastore.
help: Print help for a specific action.
request_logs: Write request logs in Apache common log format.
rollback: Rollback an in-progress update.
set_default_version: Set the default (serving) version.
update: Create or update an app version.
update_cron: Update application cron definitions.
update_dos: Update application dos definitions.
update_indexes: Update application indexes.
update_queues: Update application task queue definitions.
upload_data: Upload data records to datastore.
vacuum_indexes: Delete unused indexes from application.
Use 'help <action>' for a detailed description.

Options:
-h, --help Show the help message and exit.
-q, --quiet Print errors only.
-v, --verbose Print info level logs.
--noisy Print all logs.
-s SERVER, --server=SERVER
...
...
...

Even when I try "appcfg.py help create_bulkloader_config" for a detailed description, it still shows me the same standard help.

I have also tried on the local development server using the url http://127.0.0.1:8888/remote_api but it still gives the same help message.

I'm totally clueless as to what the problem is. I'm new to GWT and GAE, and any help will be appreciated.

Thanks.

2
This may be a silly question, but are you typing python or python2.5 before appcfg.py? E.g. python2.5 appcfg.py ...mechanical_meat
Did you try re installing the appengine sdk.Abdul Kader
Sorry folks for the late response. That was my first question on Stackoverflow, and I thought I had configured notifications for any new responses. But I didn't get any probably because you posted them as comments.DFB
@Adam - No, I'm not doing that. Should I be? @ Abdul - No, I didn't. But I tried the exact same thing on Mac and it worked. So, I'm presuming that there's something wrong with the appengine sdk installation on my Windows. I'm going to try the reinstall. Thanks to both of you for your responses.DFB
actually, no; that shouldn't be necessary. (I failed to notice previously that your Python version is 2.5.4)mechanical_meat

2 Answers

1
votes

The following fix worked for me. It looks like appcfg.py doesn't like PYTHON27 and ALWAYS returns the help menu. I fixed it by executing it with PYTHON25 and hard coded all my file locations:

C:\Python25-archive\python "C:\Program Files (x86)\Google\google_appengine\appcfg.py" rollback C:\scripts\myapp
0
votes

The right way is to change the environment variables on Windows 7:

  1. Go to System Properties
  2. Go to Advance System Settings
  3. Click on Environment Variables
  4. Append to Path variable the values C:\Python27\
  5. Click Ok and restart your computer. (Yes, it is needed.)

Another way is to:

  1. Open command Prompt
  2. Locate your python.exe file. For example:

    C:\Python27>_

  3. Then, run a python command that looks like this.

    python <appcfg_directory> download_app -A <your_app_id> -V <your_app_version> <output-dir>

Where <appcfg_directory> is equal to C:\Program Files\Google\google_appengine\appcfg.py. (Depending on your file location)

Don't forget to put quotes before and after <appcfg_directory>