durusmail: quixote-users: Call for help
Call for help
2007-01-21
2007-01-21
Re: Call for help
2007-01-30
2007-01-21
2007-01-30
2007-01-30
2007-01-30
2007-01-30
2007-02-01
2007-02-01
2007-02-01
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-03
Re: Call for help
2007-02-06
Re: Call for help
2007-02-05
2007-01-30
Call for help
Mike Orr
2007-02-01
I found a case where my make_quixote_use_qpy module that Titus inlined fails.

If you have a StaticDirectory(..., index_filenames=["index.html"]) and
request "The_Directory/", but the index file doesn't exist, and
self.list_directory is false, Quixote uses TemplateIO to make a "This
directory does not allow its contents to be listed." document that's
htmltext.

In my ._q_traverse I call htmltext on the result (to wrap it in a
header and footer), and get:
  File
"/usr/local/lib/python2.4/Quixote-2.4-py2.4-linux-i686.egg/quixote/publish.py",
line 256, in try_publish
    output = self.root_directory._q_traverse(components)
  File "/home/mso/svn/hazweb/rlink/lib/root.ptl", line 268, in _q_traverse
    output = htmltext(output)
TypeError: coercing to Unicode: need string or buffer, htmltext found

So the outer htmltext is the QPY-based one, but the one returned by
TemplateIO isn't.

I looked in quixote/utils.py and quixote/html/_py_htmltext.py but
don't see any htmltext objects created at the top level, so I don't
know why it's happening.

My root directory is in a PTL module, if that matters.  I tried
deleting the .pyc but that didn't help.

--
Mike Orr 
reply