Skip to content

when prettify is set to true, server.py should return error/ instead of error.html #5

Description

@fedelibre

I'm using cactus installed from current master via pip.
If config.json contains "prettify": true and I enter a wrong URL, cactus searches error.html instead of error/index.html. This is the error message:

Uncaught exception in write_error
Traceback (most recent call last):
  File "/home/fede/.virtualenvs/cactus/local/lib/python2.7/site-packages/tornado/web.py", line 976, in send_error
    self.write_error(status_code, **kwargs)
  File "/home/fede/.virtualenvs/cactus/src/cactus/cactus/server.py", line 61, in write_error
    return self.render("error.html")
  File "/home/fede/.virtualenvs/cactus/local/lib/python2.7/site-packages/tornado/web.py", line 704, in render
    html = self.render_string(template_name, **kwargs)
  File "/home/fede/.virtualenvs/cactus/local/lib/python2.7/site-packages/tornado/web.py", line 808, in render_string
    t = loader.load(template_name)
  File "/home/fede/.virtualenvs/cactus/local/lib/python2.7/site-packages/tornado/template.py", line 343, in load
    self.templates[name] = self._create_template(name)
  File "/home/fede/.virtualenvs/cactus/local/lib/python2.7/site-packages/tornado/template.py", line 370, in _create_template
    with open(path, "rb") as f:
IOError: [Errno 2] No such file or directory: u'/home/fede/web/cactus/.build/error.html'
404 GET /wrong/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions