eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 315 forks source link

StaticHandler object not finding 'absolute_path' #77

Closed brianjhong closed 9 years ago

brianjhong commented 10 years ago

2014-03-03 13_51_56-c__windows_system32_cmd exe - cactus serve

claudyus commented 10 years ago

Hi all,

I install cactus v3 branch using pip install git+https://github.com/koenbok/Cactus.git@v3 currently at version 10cd41a4a06ab0c8 and I get the following error without modify anything in the website:

Uncaught exception GET / (127.0.0.1)
HTTPRequest(protocol='http', host='127.0.0.1:8000', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1', body='', headers={'Connection': 'keep-alive', 'Accept-Language': 'en-US,en;q=0.8,it;q=0.6,de;q=0.4', 'Accept-Encoding': 'gzip,deflate,sdch', 'Cache-Control': 'max-age=0', 'Host': '127.0.0.1:8000', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/33.0.1750.152 Chrome/33.0.1750.152 Safari/537.36'})
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 954, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/cactus/server.py", line 35, in get
    if self.get_content_type() == "text/html":
  File "/usr/local/lib/python2.7/dist-packages/cactus/server.py", line 43, in get_content_type
    return mime.guess(self.absolute_path)
AttributeError: 'StaticHandler' object has no attribute 'absolute_path'
500 GET /
claudyus commented 10 years ago

I finally figured out what's it happen.

If you receive this message you should update the tornado package (from 2.1 to 3.2 package).

$ sudo pip install --upgrade tornado

This fix the problem.

koenbok commented 10 years ago

Thanks a lot for posting the answer! I'll update the requirements to avoid this for others.

On Sunday, April 13, 2014, Claudio Mignanti notifications@github.com wrote:

I finally figured out what's it happen.

If you receive this message you should update the tornado package (from 2.1 to 3.2 package).

$ sudo pip install --upgrade tornado

This fix the problem.

— Reply to this email directly or view it on GitHubhttps://github.com/koenbok/Cactus/issues/77#issuecomment-40310511 .