title: Google App Engine and Upload script
body: <p>I'm currently using Eclipse that came with Android Development bundle and following the GAE tutorial:</p>
  
  <p><a href="https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial" rel="nofollow">https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial</a></p>
  
  <p>I never had any server or backend experiences and I am hoping to make a Android application using features of the App Engine. </p>
  
  <p>Everything seems to be going smoothly following the tutorial until I got to the part where you need to "Create an upload script". I have no idea how I should proceed the more I read into it the more confused I am.</p>
  
  <p>The tutorial said to "Create a directory and make it your current directory" then create a script file but am I suppose to make the new directory and put it in Eclipse's AppEngine project in the package explorer or somewhere else? I don't really know how does all of this work together. </p>
  
  <p>I just got python 2.7 installed for Eclipse and made sure that the PyDev interpreter is pointing to python.exe but besides that I don't really know where to go from that point on.</p>
  
  <p>EDIT1: I am using Cygwin and run "sh upload_data.shPlace". And when I run it I get the following error:</p>
  
  <pre><code>C:\Python27\python.exe: can't open file '/cygdrive/c/Program Files (x86)/Google/google_appengine/appcfg.py': [Errno 2] No such file or directory
  </code></pre>
  
  <p>I tried adding "C:\Program Files (x86)\Google\google_appengine\appcfg.py" to the upload.sh file. It looked like the following: </p>
  
  <pre><code>C:\Program Files (x86)\Google\google_appengine\appcfg.py upload_data --config_file bulkloader.yaml --url=http://localhost:8888/remote_api --filename $1 --kind=$2 -e myemail@mail.com
  </code></pre>
  
  <p>The following error occurs:</p>
  
  <pre><code>upload_data.sh: line 2: syntax error near unexpected token `('
  upload_data.sh: line 2: `/cygdrive/c/Program Files (x86)/Google/google_appengine\appcfg.py upload_data --config_file bulkloader.yaml --url=http://localhost:8888/remote_api --filename $1 --kind=$2 -e mymail@mail.com'
  </code></pre>
  
  <p>EDIT2: Ok I added '\' to before the '(' and used '\' for spaces as well. The following is code in upload.sh right now.</p>
  
  <pre><code>C:\Program\Files\(x86\)\Google\google_appengine\appcfg.py upload_data --config_file bulkloader.yaml --url=http://localhost:8888/remote_api --filename $1 --kind=$2 -e mymail@mail.com
  </code></pre>
  
  <p>Then the following error it came up with the following error:</p>
  
  <pre><code>upload_data.sh: line 2: C:ProgramFiles(x86)Googlegoogle_appengineappcfg.py: command not found
  </code></pre>
  
  <p>I went to the google app engine directory and the appcfg.py is there. Additionally I am not too sure if I am actually using the right command. I used:</p>
  
  <blockquote>
    <p>sh upload.data.sh (arrow bracket)places.csv(arrow bracket)Place</p>
  </blockquote>
  
  <p>Does the scripts or anything needs to be placed in certain directory? I've tried putting the appcfg.py file in my scripts directory where I keep the upload_data.sh file just said [Errno 2] no such file or directory. Then I tried put the files, upload.data, places.csv and bulkloader.yaml into Google/google_appengine directory where appcfg.py is stored then it will return a "Permission Denied" error. I also re-installed python27 into "google_appengine" file. I tried just running "appcfg.py" on Cygwin and just return [Err2] No such file or directory.</p>
  
  <p>Then I tried running running on Windows command prompt writing in:</p>
  
  <pre><code>appcfg.py upload_data --config_file
  C:\Users\User\Documents\AndroidApps\Scripts\bulkloader.yaml--url=http://localhost:8888/remote_api --filename $1 --kind=$2 -e mymail@mail.com
  </code></pre>
  
  <p>The following error gets returned:</p>
  
  <pre><code>11:09 PM Uploading data records.
  Traceback (most recent call last):
    File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 126, in
  &lt;module&gt;
      run_file(__file__, globals())
    File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 122, in
  run_file
      execfile(_PATHS.script_file(script_name), globals_)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 4934, in &lt;module&gt;
      main(sys.argv)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 4925, in main
      result = AppCfgApp(argv).Run()
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 2648, in Run
      self.action(self)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 4605, in __call__
      return method()
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 4417, in PerformUpload
      run_fn(args)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
  pcfg.py", line 4298, in RunBulkloader
      sys.exit(bulkloader.Run(arg_dict))
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bu
  lkloader.py", line 4406, in Run
      SetupLogging(arg_dict)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bu
  lkloader.py", line 4362, in SetupLogging
      file_handler = logging.FileHandler(log_file, 'w')
    File "C:\Program Files (x86)\Google\google_appengine\lib\logging\__init__.py",
   line 889, in __init__
      StreamHandler.__init__(self, self._open())
    File "C:\Program Files (x86)\Google\google_appengine\lib\logging\__init__.py",
   line 908, in _open
      stream = open(self.baseFilename, self.mode)
  IOError: [Errno 13] Permission denied: 'C:\\Program Files (x86)\\Google\\google_
  appengine\\bulkloader-log-20140314.230944'
  </code></pre>
  
  <p>It seems like I can't use appcfg.py in Cygwin at all. I've been stuck for almost 2 days now.</p>
  
  <p>Thanks. </p>