$ livereload
Serving path . on 127.0.0.1:35729
[I 130920 13:56:21 server:105] Browser Connected: http://localhost:35729/
[I 130920 13:56:21 server:112] No Guardfile
[I 130920 13:56:21 task:54] Add task: /tmp/demosite/output
[I 130920 13:56:21 server:116] Start watching changes
[E 130920 13:56:24 web:1228] Uncaught exception GET / (127.0.0.1)
HTTPRequest(protocol='http', host='localhost:35729', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3', 'Cache-Control': 'max-age=0', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0', 'Host': 'localhost:35729', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate', 'Cookie': '__atuvc=190%7C37%2C308%7C38', 'If-None-Match': '"f564fb0397076cb4ea165b7847bf127bf7d581e3"', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'})
Traceback (most recent call last):
File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/tornado/web.py", line 1141, in _when_complete
callback()
File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(*self.path_args, **self.path_kwargs),
File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/livereload/server.py", line 131, in get
self.read_path(abspath)
File "/home/humitos/.virtualenvs/nikola-dev-py3/lib/python3.3/site-packages/livereload/server.py", line 167, in read_path
hasher.update(data)
TypeError: Unicode-objects must be encoded before hashing
[E 130920 13:56:24 web:1635] 500 GET / (127.0.0.1) 5.74ms
[I 130920 13:56:24 web:1635] 200 GET /favicon.ico (127.0.0.1) 4.69ms
^CShutting down...
--- server.py.bak 2013-09-20 13:31:09.552436660 -0300
+++ server.py 2013-09-20 13:31:12.872436657 -0300
@@ -164,6 +164,8 @@
self.write(data)
hasher = hashlib.sha1()
+ if isinstance(data, str):
+ data = data.encode('utf8')
hasher.update(data)
self.set_header('Etag', '"%s"' % hasher.hexdigest())
return