Re: problems with trackback

Ted Leung <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
Can you send me the versions of comments.py and trackback.py that you  
are using?

On Apr 4, 2005, at 8:42 AM, Joseph Reagle wrote:

> On Sunday 03 April 2005 04:24, Ted Leung wrote:
>> There were some bugs in trackback.py which got fixed for 1.2.  You
>> might try the 1.2 versions.
>
> Unfortunately, I was working on that too, but couldn't even get  
> comments
> working. As an aside, when I turn cgitb on `import cgitb;  
> cgitb.enable()`
> in Konqueror I get this:
>
> [[[
> <!--: spam
> Vary: Accept-Encoding,User-Agent
> Content-Encoding: gzip
> Content-Length: 2238
> Keep-Alive: timeout=5, max=100
> Connection: Keep-Alive
> Content-Type: text/html
>
>
>    [goobly gook]
> ]]]
>
> In Firefox, the HTML work and it complains of the following:
>
> http://reagle.org/joseph/pyblosxom2.cgi/culture/share-cooperative
> -> [submit comment]
> [[[
>
> ]]]
>
>
> KeyError	Python 2.2.3: /usr/bin/python
> Mon Apr 4 11:40:36 2005
>
> A problem occurred in a Python script. Here is the sequence of function
> calls leading up to the error, in the order they occurred.
>
>  /web/script/reagle/reagle.org/joseph/pyblosxom2.cgi
>    59
>    60     else:
>    61         p.run()
>    62         response = p.getResponse()
>    63         response.sendHeaders(sys.stdout)
> p = <Pyblosxom.pyblosxom.PyBlosxom instance>, p.run = <bound method
> PyBlosxom.run of <Pyblosxom.pyblosxom.PyBlosxom instance>>
>
>  /home/reagle/data/2web/pyblosxom-1.2/Pyblosxom/pyblosxom.py in
> run(self=<Pyblosxom.pyblosxom.PyBlosxom instance>, static=0)
>   131
>   132         if not handled == 1:
>   133             blosxom_handler(self._request)
>   134
>   135         # do end callback
> global blosxom_handler = <function blosxom_handler>, self =
> <Pyblosxom.pyblosxom.PyBlosxom instance>, self._request = Request
>
>  /home/reagle/data/2web/pyblosxom-1.2/Pyblosxom/pyblosxom.py in
> blosxom_handler(request=Request)
>   724     # giving everyone a chance to transform the data.  the  
> request is
>   725     # modified in place.
>   726     tools.run_callback("prepare", {"request": request})
>   727
>   728     # now we pass the entry_list through the renderer
> global tools = <module 'Pyblosxom.tools' from
> '/home/reagle/data/2web/pyblosxom-1.2/Pyblosxom/tools.py'>,
> tools.run_callback = <function run_callback>, request = Request
>
>  /home/reagle/data/2web/pyblosxom-1.2/Pyblosxom/tools.py in
> run_callback(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)
>   436     for mem in chain:
>   437         # we call the function with the input dict it returns an
> output.
>   438         output = mem(input)
>   439
>   440         # we fun the output through our donefunc to see if we  
> should
> stop
> output = None, mem = <function cb_prepare>, input = {'request':  
> Request}
>
>   
> /home/reagle/data/2web/pyblosxom-1.2/contrib.1.2/plugins/comments/ 
> plugins/comments.py
> in cb_prepare(args={'request': Request})
>   525
>   526         encoding = config['blog_encoding']
>   527         decode_form(form, encoding)
>   528
>   529         body = form['body'].value
> global decode_form = <function decode_form>, form = FieldStorage(None,  
> None,
> [MiniFieldStorage('secr...ah blah'), MiniFieldStorage('Submit',
> 'Submit')]), encoding = 'iso-8859-1'
>
>   
> /home/reagle/data/2web/pyblosxom-1.2/contrib.1.2/plugins/comments/ 
> plugins/comments.py
> in decode_form(d=FieldStorage(None, None, [MiniFieldStorage('secr...ah
> blah'), MiniFieldStorage('Submit', 'Submit')]), encoding='iso-8859-1')
>   554
>   555 def decode_form(d, encoding):
>   556     for key in d:
>   557         d[key].value = d[key].value.decode(encoding)
>   558
> key undefined, d = FieldStorage(None, None,  
> [MiniFieldStorage('secr...ah
> blah'), MiniFieldStorage('Submit', 'Submit')])
>
>  /usr/lib/python2.2/cgi.py in __getitem__(self=FieldStorage(None, None,
> [MiniFieldStorage('secr...ah blah'), MiniFieldStorage('Submit',
> 'Submit')]), key=0)
>   548             if item.name == key: found.append(item)
>   549         if not found:
>   550             raise KeyError, key
>   551         if len(found) == 1:
>   552             return found[0]
> KeyError undefined, key = 0
>
> KeyError: 0
>       __doc__ = 'Mapping key not found.'
>       __getitem__ = <bound method KeyError.__getitem__ of
> <exceptions.KeyError instance>>
>       __init__ = <bound method KeyError.__init__ of  
> <exceptions.KeyError
> instance>>
>       __module__ = 'exceptions'
>       __str__ = <bound method KeyError.__str__ of <exceptions.KeyError
> instance>>
>       args = (0,)
>
>
> <pyblosxom2.cgi><config.py>
----
Ted Leung                          Blog: <http://www.sauria.com/blog>
PGP Fingerprint: 1003 7870 251F FA71 A59A  CEE3 BEBA 2B87 F5FC 4B42



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
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.