title: tornado: AttributeError: 'StaticHandler' object has no attribute 'absolute_path'
body: <p>I'm building a simple server with python tornado. Here is the code:<br></p>
  
  <pre><code>class IndexHandler(tornado.web.RequestHandler):
      def get(self, param):
          print("\n\nthis is a get request from indexhandler:")
          if param:
              #print("frontend/" + param)
              self.render("frontend/" + param)
              print("I'm html")
          else:
              print("index.html")
              self.render("index.html")
  
  class StaticHandler(tornado.web.StaticFileHandler):
      def initialize(self, path, default_filename=None):
          self.root = os.path.abspath(path) + os.path.sep
          self.default_filename = default_filename
  
      def head(self, path):
          self.get(path, include_body=False)
  
      def get(self, param, include_body=True):
          abspath = "frontend/" + param
          print(abspath)
          myfile = open(abspath, "rb")
          try:
              self.write(myfile.read())
          finally:
              myfile.close()
  
  class Application(tornado.web.Application):
      def __init__(self):
          handlers = [
                  (r"/(.*jpg$)", StaticHandler, {"path": "/frontend"}),
                  (r"/(.*css$)", StaticHandler, {"path": "/frontend"}),
                  (r"/(.*html$)", IndexHandler)
                  ]
  
          super(Application, self).__init__(handlers, **settings)
  
  
  if __name__ == "__main__":
      tornado.options.parse_command_line()
      http_server = tornado.httpserver.HTTPServer(Application())
      http_server.listen(options.port)
      tornado.ioloop.IOLoop.instance().start()
  </code></pre>
  
  <p>However, when I visit my website, all of img and css files get an error:<br></p>
  
  <pre><code>Traceback (most recent call last):
        File "/usr/local/lib/python3.5/site-packages/tornado/web.py", line 1513, in _execute
          self.finish()
        File "/usr/local/lib/python3.5/site-packages/tornado/web.py", line 973, in finish
          self.set_etag_header()
        File "/usr/local/lib/python3.5/site-packages/tornado/web.py", line 1416, in set_etag_header
          etag = self.compute_etag()
        File "/usr/local/lib/python3.5/site-packages/tornado/web.py", line 2436, in compute_etag
          version_hash = self._get_cached_version(self.absolute_path)
      AttributeError: 'StaticHandler' object has no attribute 'absolute_path'
  [E 170502 11:44:48 web:2063] 500 GET /css/reset.css (108.61.177.156) 2.06ms
  </code></pre>