Re: PyBlosxom 1.0 Released!
Joseph Reagle <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Organization | MIT |
| Message-ID | <[email protected]> |
On Friday 28 May 2004 15:27, will guaraldi wrote: > The second is to grab blosxom.py from CVS and go back to your flavour dir > setup. Ok, that helps! I started the migration over from scratch and this is what I had to do: 1. kdiff3 pyblosxom.cgi ~/data/2web/reagle/joseph/pyblosxom.cgi 2. kdiff3 config.py ~/data/2web/pyblosxom/web/config.py 3. copy files from the new version into the existing install making sure to remove files no longer necessary and keep my own plugins and lucene install etc., 3. get the flavourdir tweak from CVS and copy to pyblosxom/Pyblosxom/renderers/blosxom.py 4. I used to be able to set the default py['parser'] = 'textile' and it would would with ".txt" files, no longer works, and since there's only a few I rename them to ".txtl" 5. How do I get rid of the automatically generated "<h2>Thu, 27 May 2004</h2>"? Now, I need to generate an empty file: `echo >> date_head.html` 6. Creating a comment, the comment is created by I get a crazy error. I haven't tested the trackback yet, and I've attached the error report one see after submitting a comment (which actually is created).
error.html
(text/html, 13.6 KB)
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>AttributeError</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial">Python 2.2.3: /usr/bin/python<br>Fri May 28 13:29:00 2004</font></td></tr></table>
<p>A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.<p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///web/script/reagle/reagle.org/joseph/blog">/web/script/reagle/reagle.org/joseph/blog</a> </td></tr>
<tr><td><font color="#909090"><tt><small> 58</small> else:<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 59</small> p = PyBlosxom(req)<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 60</small> p.run()<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 61</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 62</small> # vim: shiftwidth=4 tabstop=4 expandtab<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>p</strong> = <Pyblosxom.pyblosxom.PyBlosxom instance>, p.<strong>run</strong> = <bound method PyBlosxom.run of <Pyblosxom.pyblosxom.PyBlosxom instance>></font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py">/home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py</a> in <strong>run</strong>(self=<Pyblosxom.pyblosxom.PyBlosxom instance>)</td></tr>
<tr><td><font color="#909090"><tt><small> 87</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 88</small> if not handled == 1:<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 89</small> blosxom_handler(self._request)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 90</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 91</small> # do end callback<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>blosxom_handler</strong> = <function blosxom_handler>, <strong>self</strong> = <Pyblosxom.pyblosxom.PyBlosxom instance>, self.<strong>_request</strong> = Request</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py">/home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py</a> in <strong>blosxom_handler</strong>(request=Request)</td></tr>
<tr><td><font color="#909090"><tt><small> 431</small> # giving everyone a chance to transform the data. the request is<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 432</small> # modified in place.<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 433</small> tools.run_callback("prepare", {"request": request})<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 434</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 435</small> # now we pass the entry_list through the renderer<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>tools</strong> = <module 'Pyblosxom.tools' from '/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py'>, tools.<strong>run_callback</strong> = <function run_callback>, <strong>request</strong> = Request</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py">/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py</a> in <strong>run_callback</strong>(chain=[<function cb_prepare>, <function cb_prepare>, <function cb_prepare>, <function cb_prepare>, <function cb_prepare>], input={'request': Request}, mappingfunc=<function <lambda>>, donefunc=<function <lambda>>, defaultfunc=None)</td></tr>
<tr><td><font color="#909090"><tt><small> 413</small> for mem in chain:<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 414</small> # we call the function with the input dict it returns an output.<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 415</small> output = mem(input)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 416</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 417</small> # we fun the output through our donefunc to see if we should stop<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>output</strong> = None, <strong>mem</strong> = <function cb_prepare>, <strong>input</strong> = {'request': Request}</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py">/home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py</a> in <strong>cb_prepare</strong>(args={'request': Request})</td></tr>
<tr><td><font color="#909090"><tt><small> 400</small> cdict['email'] = form['email'].value<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 401</small> <br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 402</small> writeComment(config, data, cdict)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 403</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 404</small> <br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>writeComment</strong> = <function writeComment>, <strong>config</strong> = {'base_url': 'http://reagle.org/joseph/blog', 'blog_description': 'Open Communities, Media, Source, and Standards', 'blog_encoding': 'iso-8859-1', 'blog_language': 'en', 'blog_title': 'Joseph Reagle : career/phd/s04', 'comment_dir': '/home/reagle/data/2web/reagle.org/joseph/comments', 'comment_ext': 'cmt', 'datadir': '/home/reagle/data/2web/reagle.org/joseph/content', 'depth': 0, 'flavourdir': '/home/reagle/data/2web/reagle.org/joseph/flavours', ...}, <strong>data</strong> = {'archivelinks': <pyarchives.PyblArchives instance>, 'bl_type': 'file', 'breadcrumbs': <breadcrumbs.BreadCrumbs instance>, 'categorylinks': <pycategories.PyblCategories instance>, 'entry_list': [<Entry instance: /home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html>
], 'extensions': {'html': <function readfile>, 'txt': <function blosxom_entry_parser>, 'txtl': <function readfile>}, 'filestat_cache': {'/home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html': (2004, 5, 27, 9, 33, 24, 3, 148, 1)}, 'flavour': 'html', 'path_info': ['career', 'phd', 's04'], 'pi_bl': 'career/phd/s04', ...}, <strong>cdict</strong> = {'author': 'foo', 'description': 'baz', 'email': 'bar', 'link': '', 'pubDate': '1085765340.42', 'source': '', 'title': 'Results of the Fall 2003 Semester'}</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py">/home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py</a> in <strong>writeComment</strong>(config={'base_url': 'http://reagle.org/joseph/blog', 'blog_description': 'Open Communities, Media, Source, and Standards', 'blog_encoding': 'iso-8859-1', 'blog_language': 'en', 'blog_title': 'Joseph Reagle : career/phd/s04', 'comment_dir': '/home/reagle/data/2web/reagle.org/joseph/comments', 'comment_ext': 'cmt', 'datadir': '/home/reagle/data/2web/reagle.org/joseph/content', 'depth': 0, 'flavourdir': '/home/reagle/data/2web/reagle.org/joseph/flavours', ...}, data={'archivelinks': <pyarchives.PyblArchives instance>, 'bl_type': 'file', 'breadcrumbs': <breadcrumbs.BreadCrumbs instance>, 'categorylinks': <pycategories.PyblCategories instance>, 'entry_list': [<Entry instance: /home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html>
], 'extensions': {'html': <function readfile>, 'txt': <function blosxom_entry_parser>, 'txtl': <function readfile>}, 'filestat_cache': {'/home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html': (2004, 5, 27, 9, 33, 24, 3, 148, 1)}, 'flavour': 'html', 'path_info': ['career', 'phd', 's04'], 'pi_bl': 'career/phd/s04', ...}, comment={'author': 'foo', 'description': 'baz', 'email': 'bar', 'link': '', 'pubDate': '1085765340.42', 'source': '', 'title': 'Results of the Fall 2003 Semester'})</td></tr>
<tr><td><font color="#909090"><tt><small> 218</small> latest = open(latestFilename,"w")<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 219</small> except:<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 220</small> tools.log("Couldn't open latest comment pickle for writing")<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 221</small> return<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 222</small> else:<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>tools</strong> = <module 'Pyblosxom.tools' from '/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py'>, tools.log <em>undefined</em></font></small></td></tr></table><p><strong>AttributeError</strong>: 'module' object has no attribute 'log'
<br><tt><small> </small> </tt>__doc__ =
'Attribute not found.'
<br><tt><small> </small> </tt>__getitem__ =
<bound method AttributeError.__getitem__ of <exceptions.AttributeError instance>>
<br><tt><small> </small> </tt>__init__ =
<bound method AttributeError.__init__ of <exceptions.AttributeError instance>>
<br><tt><small> </small> </tt>__module__ =
'exceptions'
<br><tt><small> </small> </tt>__str__ =
<bound method AttributeError.__str__ of <exceptions.AttributeError instance>>
<br><tt><small> </small> </tt>args =
("'module' object has no attribute 'log'",)
<!-- The above is a description of an error in a Python program, formatted
for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:
Traceback (most recent call last):
File "/web/script/reagle/reagle.org/joseph/blog", line 60, in ?
p.run()
File "/home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py", line 89, in run
blosxom_handler(self._request)
File "/home/reagle/data/2web/pyblosxom/Pyblosxom/pyblosxom.py", line 433, in blosxom_handler
tools.run_callback("prepare", {"request": request})
File "/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py", line 415, in run_callback
output = mem(input)
File "/home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py", line 402, in cb_prepare
writeComment(config, data, cdict)
File "/home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins/comments.py", line 220, in writeComment
tools.log("Couldn't open latest comment pickle for writing")
AttributeError: 'module' object has no attribute 'log'
-->