That was exactly it, thank you a ton. I had been using welcome.kid as my template to see if this all was working. On Sep 30, 2006, at 8:59 PM, Ian Wilson wrote:
> > I am not sure if this will solve your problem. > > Make sure py:extends="'master.kid'" gets change to reflect its new > location. For example: > py:extends="'../master.kid'" when your kid file is in > /templates/folder/file.kid. This syntax is really touchy so make sure > you have the single quotes around the path inside the double quotes. > The error message is usually totally useless in this case(As are most > kid error messages). > > > -Ian > > On 9/30/06, Adam M Peacock <[EMAIL PROTECTED]> wrote: >> >> I'm trying to put a Kid template in a subdirectory of templates, such >> as projectdir/templates/folder/file.kid, but whenever I try to access >> it, I get a "TypeError: expected string or buffer" (full traceback >> included at the bottom of the post). I have put __init__.py in the >> folder and this does work with Cheetah, just not with Kid. >> >> Full traceback: >> Page handler: <bound method Root.test of <thing.controllers.Root >> object at 0x2ae1395cb550>> >> Traceback (most recent call last): >> File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ >> cherrypy/_cphttptools.py", line 105, in _run >> self.main() >> File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ >> cherrypy/_cphttptools.py", line 254, in main >> body = page_handler(*virtual_path, **self.params) >> File "<string>", line 3, in test >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/controllers.py", line 326, in expose >> output = database.run_with_transaction( >> File "<string>", line 5, in run_with_transaction >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/database.py", line 246, in so_rwt >> retval = func(*args, **kw) >> File "<string>", line 5, in _expose >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/controllers.py", line 343, in <lambda> >> mapping, fragment, args, kw))) >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/controllers.py", line 380, in _execute_func >> return _process_output(output, template, format, content_type, >> mapping, fragment) >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/controllers.py", line 74, in _process_output >> fragment=fragment) >> File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ >> turbogears/view/base.py", line 131, in render >> return engine.render(**kw) >> File "/usr/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/ >> turbokid/kidsupport.py", line 140, in render >> tclass = self.load_template(template) >> File "/usr/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/ >> turbokid/kidsupport.py", line 110, in load_template >> mod = _compile_template(package, basename, tfile, classname) >> File "/usr/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/ >> turbokid/kidsupport.py", line 14, in _compile_template >> mod = kid.load_template(tfile, name=classname) >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> __init__.py", line 125, in load_template >> mod = importer._create_module(code, name, filename, store=cache, >> ns=ns) >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> importer.py", line 56, in _create_module >> exec code in mod.__dict__ >> File "/home/adam/gears/Thing/thing/templates/funk/welcome.py", >> line 17, in ? >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> template_util.py", line 43, in get_base_class >> cls = kid.load_template(path).Template >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> __init__.py", line 120, in load_template >> code = compiler.compile(fo, filename, encoding) >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> compiler.py", line 48, in compile >> py = kid.parser.parse(source, encoding, filename=filename) >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> parser.py", line 45, in parse >> parser = KidParser(document(source, encoding=encoding, >> filename=filename), encoding) >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> pull.py", line 58, in document >> file = open_resource(file, 'rb') >> File "/usr/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/ >> util.py", line 25, in open_resource >> (scheme, rest) = splittype(uri) >> File "/usr/lib/python2.4/urllib.py", line 935, in splittype >> match = _typeprog.match(url) >> TypeError: expected string or buffer >> >>> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

