title: ValueError: invalid literal for int() with base 10 trying to retrieve a query parameter from Google App engine
body: <p>I received the following error when trying to retrieve data using <a href="http://en.wikipedia.org/wiki/Google_App_Engine" rel="nofollow noreferrer">Google App Engine</a> from a single entry to a single page e.g. foobar.com/page/1 would show all the data from id 1:</p>
  
  <pre><code>ValueError: invalid literal for int() with base 10
  </code></pre>
  
  <p>Here are the files:</p>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>class One(webapp.RequestHandler):    
      def get(self, id):
          id         = models.Page.get_by_id(int(str(self.request.get("id")))) 
          page_query = models.Page.get(db.Key.from_path('Page', id))
          pages      = page_query
  
          template_values = {
              'pages': pages,
          }
  
          path = os.path.join(os.path.dirname(__file__), 'template/list.html')
          self.response.out.write(template.render(path, template_values))
  </code></pre>
  
  <p><strong>Urls.py</strong>:</p>
  
  <pre><code>(r'/browse/(\d+)/', One),
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre>
  Traceback (most recent call last):
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py", line 501, in __call__
      handler.get(*groups)
    File "/Volumes/foobar/views.py", line 72, in get
      id = models.Page.get_by_id(int(str(self.request.get("id"))))
  ValueError: invalid literal for int() with base 10: ''
  </pre>