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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<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>&nbsp;</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>&nbsp;&nbsp;&nbsp;58</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;59</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p&nbsp;=&nbsp;PyBlosxom(req)<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;&nbsp;60</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p.run()<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;61</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;62</small>&nbsp;#&nbsp;vim:&nbsp;shiftwidth=4&nbsp;tabstop=4&nbsp;expandtab<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>p</strong>&nbsp;= &lt;Pyblosxom.pyblosxom.PyBlosxom instance&gt;, p.<strong>run</strong>&nbsp;= &lt;bound method PyBlosxom.run of &lt;Pyblosxom.pyblosxom.PyBlosxom instance&gt;&gt;</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big>&nbsp;</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=&lt;Pyblosxom.pyblosxom.PyBlosxom instance&gt;)</td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;87</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;88</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;not&nbsp;handled&nbsp;==&nbsp;1:<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;&nbsp;89</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blosxom_handler(self._request)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;90</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;&nbsp;91</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;do&nbsp;end&nbsp;callback<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>blosxom_handler</strong>&nbsp;= &lt;function blosxom_handler&gt;, <strong>self</strong>&nbsp;= &lt;Pyblosxom.pyblosxom.PyBlosxom instance&gt;, self.<strong>_request</strong>&nbsp;= Request</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big>&nbsp;</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>&nbsp;&nbsp;431</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;giving&nbsp;everyone&nbsp;a&nbsp;chance&nbsp;to&nbsp;transform&nbsp;the&nbsp;data.&nbsp;&nbsp;the&nbsp;request&nbsp;is<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;432</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;modified&nbsp;in&nbsp;place.<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;433</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tools.run_callback("prepare",&nbsp;{"request":&nbsp;request})<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;434</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;435</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;now&nbsp;we&nbsp;pass&nbsp;the&nbsp;entry_list&nbsp;through&nbsp;the&nbsp;renderer<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>tools</strong>&nbsp;= &lt;module 'Pyblosxom.tools' from '/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py'&gt;, tools.<strong>run_callback</strong>&nbsp;= &lt;function run_callback&gt;, <strong>request</strong>&nbsp;= Request</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big>&nbsp;</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=[&lt;function cb_prepare&gt;, &lt;function cb_prepare&gt;, &lt;function cb_prepare&gt;, &lt;function cb_prepare&gt;, &lt;function cb_prepare&gt;], input={'request': Request}, mappingfunc=&lt;function &lt;lambda&gt;&gt;, donefunc=&lt;function &lt;lambda&gt;&gt;, defaultfunc=None)</td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;413</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;mem&nbsp;in&nbsp;chain:<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;414</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;we&nbsp;call&nbsp;the&nbsp;function&nbsp;with&nbsp;the&nbsp;input&nbsp;dict&nbsp;it&nbsp;returns&nbsp;an&nbsp;output.<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;415</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output&nbsp;=&nbsp;mem(input)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;416</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;417</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;we&nbsp;fun&nbsp;the&nbsp;output&nbsp;through&nbsp;our&nbsp;donefunc&nbsp;to&nbsp;see&nbsp;if&nbsp;we&nbsp;should&nbsp;stop<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>output</strong>&nbsp;= None, <strong>mem</strong>&nbsp;= &lt;function cb_prepare&gt;, <strong>input</strong>&nbsp;= {'request': Request}</font></small></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big>&nbsp;</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>&nbsp;&nbsp;400</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cdict['email']&nbsp;=&nbsp;form['email'].value<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;401</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;402</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writeComment(config,&nbsp;data,&nbsp;cdict)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;403</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;404</small>&nbsp;<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>writeComment</strong>&nbsp;= &lt;function writeComment&gt;, <strong>config</strong>&nbsp;= {'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>&nbsp;= {'archivelinks': &lt;pyarchives.PyblArchives instance&gt;, 'bl_type': 'file', 'breadcrumbs': &lt;breadcrumbs.BreadCrumbs instance&gt;, 'categorylinks': &lt;pycategories.PyblCategories instance&gt;, 'entry_list': [&lt;Entry instance: /home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html&gt;
], 'extensions': {'html': &lt;function readfile&gt;, 'txt': &lt;function blosxom_entry_parser&gt;, 'txtl': &lt;function readfile&gt;}, '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>&nbsp;= {'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>&nbsp;</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': &lt;pyarchives.PyblArchives instance&gt;, 'bl_type': 'file', 'breadcrumbs': &lt;breadcrumbs.BreadCrumbs instance&gt;, 'categorylinks': &lt;pycategories.PyblCategories instance&gt;, 'entry_list': [&lt;Entry instance: /home/reagle/data/2web/reagle.org/joseph/content/career/phd/s04.html&gt;
], 'extensions': {'html': &lt;function readfile&gt;, 'txt': &lt;function blosxom_entry_parser&gt;, 'txtl': &lt;function readfile&gt;}, '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>&nbsp;&nbsp;218</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latest&nbsp;=&nbsp;open(latestFilename,"w")<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;219</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except:<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>&nbsp;&nbsp;220</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tools.log("Couldn't&nbsp;open&nbsp;latest&nbsp;comment&nbsp;pickle&nbsp;for&nbsp;writing")<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;221</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>&nbsp;&nbsp;222</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>tools</strong>&nbsp;= &lt;module 'Pyblosxom.tools' from '/home/reagle/data/2web/pyblosxom/Pyblosxom/tools.py'&gt;, tools.log <em>undefined</em></font></small></td></tr></table><p><strong>AttributeError</strong>: 'module' object has no attribute 'log'
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>__doc__&nbsp;=
'Attribute not found.'
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>__getitem__&nbsp;=
&lt;bound method AttributeError.__getitem__ of &lt;exceptions.AttributeError instance&gt;&gt;
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>__init__&nbsp;=
&lt;bound method AttributeError.__init__ of &lt;exceptions.AttributeError instance&gt;&gt;
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>__module__&nbsp;=
'exceptions'
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>__str__&nbsp;=
&lt;bound method AttributeError.__str__ of &lt;exceptions.AttributeError instance&gt;&gt;
<br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
("'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'

-->
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.