0
votes

I am trying to upload an XML file to the google data store. The steps I have followed

-Use a sample guestbook application and upload it to google appengine using the correct app-id -My app.yml looks like this:

application: app-id
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: .*
  script: guestbook.app

libraries:
- name: webapp2
  version: "2.5.2"
builtins:
- remote_api: on

-I want to upload an entire XML file to the datastore , so I enter:

appcfg.py upload_data --url=http://app-id.appspot.com/_ah/remote_api --kind=xml --filename=pathtoxml/xml
  • The output produced is as follows:
[INFO    ] Logging to bulkloader..
[INFO    ] Throttling transfers:
[INFO    ] Bandwidth: 250000 bytes/second
[INFO    ] HTTP connections: 8/second
[INFO    ] Entities inserted/fetched/modified: 20/second
[INFO    ] Batch Size: 10
Error 404: --- begin server output ---
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>404 NOT_FOUND</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: NOT_FOUND</h1>
</body></html>
--- end server output ---

-If I just type in myappid.appspot.com/_ah/remote_api it says page not found.

What am I doing wrong?

2

2 Answers

1
votes

The next step after Batch Size: 10 is to open the db file. So, I believe the 404 belongs to the pathtoxml/xml. pathtoxml/xml is not a valid file with extension. Or, if you just made a typo above, try changing directories to the directory with the file (cd pathtoxml), and get rid of the relative path: --filename=myfile.xml.

1
votes

You receive the 404 error since the URL is not valid. In order to solve it, apart from changing the xml path using a correct file extension (answer from GAEfan), remove the "_ah" of the URL.

appcfg.py upload_data --url=http://app-id.appspot.com/remote_api --kind=xml --filename=myfile.xml