# coding: utf-8
from bottle import jinja2_template as template
print template('test1')
>python test1.py
Traceback (most recent call last):
File "test1.py", line 5, in <module>
print template('test1')
File "/usr/local/lib/python2.6/dist-packages/bottle-0.6.4-py2.6.egg/bottle.py", line 974, in jinja2_template
return template(tpl_name, **kargs)
File "/usr/local/lib/python2.6/dist-packages/bottle-0.6.4-py2.6.egg/bottle.py", line 955, in template
TEMPLATES[tpl] = template_adapter(name=tpl, lookup=lookup)
File "/usr/local/lib/python2.6/dist-packages/bottle-0.6.4-py2.6.egg/bottle.py", line 758, in __init__
self.prepare()
File "/usr/local/lib/python2.6/dist-packages/bottle-0.6.4-py2.6.egg/bottle.py", line 834, in prepare
self.tpl = self.env.get_template(self.filename)
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/environment.py", line 552, in get_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/loaders.py", line 108, in load
code = environment.compile(source, name, filename)
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/environment.py", line 435, in compile
source = self._parse(source, name, filename)
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/environment.py", line 378, in _parse
return Parser(self, source, name, filename).parse()
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/parser.py", line 30, in __init__
self.stream = environment._tokenize(source, name, filename, state)
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/environment.py", line 409, in _tokenize
source = self.preprocess(source, name, filename)
File "/usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/environment.py", line 403, in preprocess
self.extensions.itervalues(), unicode(source))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
а если запускать из самого еклипса, то все нормально работает!
документации мало по bottle, через поисковики фиг че найдешь - одни бутылки предлгают