Re: problems with trackback
Joseph Reagle <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Organization | MIT |
| Message-ID | <[email protected]> |
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
(application/x-python, 2.2 KB) - not displayed
config.py
(application/x-python, 4.9 KB)
py = {}
###############
# Start Below #
###############
# If your PyBlosxom installation is in a funky place, uncomment
# this next line and point it to your PyBlosxom installation
# directory.
py["codebase"] = "/home/reagle/data/2web/pyblosxom-1.1"
# What's this blog's title?
py['blog_title'] = "Joseph Reagle"
# What's this blog's description (for outgoing RSS feed)?
py['blog_description'] = "Open Communities, Media, Source, and Standards"
# What's this blog's author name and email?
py['blog_author'] = "Joseph Reagle [email protected]"
# What's this blog's primary language (for outgoing RSS feed)?
py['blog_language'] = "en"
# Encoding for output. Default is iso-8859-1.
py['blog_encoding'] = "iso-8859-1"
# Where are this blog's entries kept?
py['datadir'] = "/home/reagle/data/2web/reagle.org/joseph/content"
# Where should PyBlosxom log files be kept?
py['logdir'] = "/home/reagle/logs/pyblosxom"
# List of strings with directories that should be ignored (e.g. "CVS")
# ex: py['ignore_directories'] = ["CVS", "temp"]
py['ignore_directories'] = []
# Should I stick only to the datadir for items or travel down the directory
# hierarchy looking for items? If so, to what depth?
# 0 = infinite depth (aka grab everything), 1 = datadir only, n = n levels down
py['depth'] = 0
# How many entries should I show on the home page?
py['num_entries'] = 20
py['comment_dir'] = "/home/reagle/data/2web/reagle.org/joseph/comments"
py['comment_draft_ext'] = 'wat'
py['flavourdir'] = "/home/reagle/data/2web/reagle.org/joseph/flavours"
# py['nospam_font'] = '/home/reagle/data/2web/pyblosxom-1.1/contrib/fonts'
py['trackback_urltrigger'] = "/trackback"
###########################
# Optional Configurations #
###########################
# What should this blog use as its base url?
# py['base_url'] = "http://www.some.host/weblog"
py['base_url'] = "http://reagle.org/joseph/blog"
# Default parser/preformatter. Defaults to plain (does nothing)
#py['parser'] = 'plain'
# Using Caching? Caching speeds up rendering the page that is going to be
# shown. Even if you are not using pyblosxom special features, caching can
# improve rendering speed of certain flavours that can show a large number of
# files at one time. Choose a cache mechanism you'd like, see the
# Pyblosxom/cache/ directory, and read the source on how to enable caching with
# the particular cache driver, you need to set two variables:
#py['cacheDriver'] = 'xxxx'
#py['cacheConfig'] = ''
# Plugin directories:
# You can now specify where you plugins all lives, there are two types
# of plugindirectories, the standard pyblosxom plugins, and the xmlrpc
# plugins. You can list out as many directories you want, but they
# should only contain the related plugins.
# Example: py['plugin_dirs'] = ['/opt', '/usr/bin']
#py['plugin_dirs'] = ['/path/to/my/plugins']
# py['plugin_dirs'] = ['/home/reagle/data/2web/pyblosxom/contrib/plugins',
# '/home/reagle/data/2web/pyblosxom/contrib/entryparsers',
# '/home/reagle/data/2web/pyblosxom/contrib/plugins/comments/plugins']
py['plugin_dirs'] = ['/home/reagle/data/2web/pyblosxom-1.1/contrib/plugins',
'/home/reagle/data/2web/pyblosxom-1.1/contrib/entryparsers',]
# There are two ways for PyBlosxom to load plugins. The first is the
# default way which involves loading all the plugins in the lib/plugins
# directory in alphanumeric order. The second is by specifying a
# "load_plugins" key here. Doing so will cause us to load only the
# plugins you name and we will load them in the order you name them.
# The "load_plugins" key is a list of strings where each string is
# the name of a plugin module (i.e. the filename without the .py at
# the end).
# ex: py['load_plugins'] = ["pycalendar", "pyfortune", "pyarchives"]
#py['load_plugins'] = []
py['load_plugins'] = ['comments', 'conditionalhttp', 'pyarchives', 'pycategories',
'breadcrumbs', 'trackback',
'txtl', 'htmlentryparser']
# Doing static rendering? Static rendering essentially "compiles" your
# blog into a series of static html pages. For more details, read:
# http://wiki.subtlehints.net/moin/PyBlosxom_2fStaticRendering
#
# What directory do you want your static html pages to go into?
#py["static_dir"] = "/path/to/static/dir"
# What flavours should get generated?
#py["static_flavours"] = ["html"]
# What other paths should we statically render?
# This is for additional urls handled by other plugins like the booklist
# and plugin_info plugins. If there are multiple flavours you want
# to capture, specify each:
# ex: py["static_urls"] = ["/booklist.rss", "/booklist.html"]
#py["static_urls"] = ["/path/to/url1", "/path/to/url2"]
# Whether (1) or not (0) you want to create date indexes using month
# names? (ex. /2004/Apr/01) Defaults to 1 (yes).
#py["static_monthnames"] = 1
# Whether (1) or not (0) you want to create date indexes using month
# numbers? (ex. /2004/04/01) Defaults to 0 (no).
#py["static_monthnumbers"] = 0