Tornado: StaticFileHandler throws exception "missing 1 required positional argument: 'path'"

Created on 2 Nov 2014  路  2Comments  路  Source: tornadoweb/tornado

Python 3.4.0, Tornado 3.1.1
Example application: http://goo.gl/gjPqI4
Some logs: http://pastebin.com/me40BeV8

Most helpful comment

A StaticFileHandler must be bound with a pattern as shown in the docs: the (.*) is necessary to tell the StaticFileHandler what part of the path is the filename.

All 2 comments

I have this error as well:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tornado/web.py", line 1445, in _execute
    result = yield result
  File "/usr/local/lib/python3.4/dist-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/usr/local/lib/python3.4/dist-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/local/lib/python3.4/dist-packages/tornado/gen.py", line 267, in wrapper
    result = func(*args, **kwargs)
TypeError: get() missing 1 required positional argument: 'path'

What was your resolution?

A StaticFileHandler must be bound with a pattern as shown in the docs: the (.*) is necessary to tell the StaticFileHandler what part of the path is the filename.

Was this page helpful?
0 / 5 - 0 ratings