|
From: andrew f. <afi...@ho...> - 2010-10-13 15:28:09
|
Will,
Thanks for your continued support. I did try most of what's there. I'm attaching the results of pyblosxom.cgi to the end of this message. The apache error_log shows the same trace that the previous pyblosxom-cmd does: a KeyError on form inside the cb_head function of tags. In the debugger, form is a FieldStorage object with no keys.
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/cgi.py(558)__getitem__()
-> raise KeyError, key
(Pdb) u
> /Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/plugins/tags/tags.py(408)cb_head()
-> flavour = config.get("default_flavour", "html")
(Pdb) p form
FieldStorage(None, None, [])
(Pdb) p form.keys()
[]
I can "fix" this by changing line 407 of tags.py from
except AttributeError:
to
except KeyError:
Now pyblosxom works as desired. However, I don't understand what is going on with form.
Thanks again,
Andrew
% ./pyblosxom.cgi test
pyblosxom.cgi version 1.5rc2 20100803
Trying to import the config module....
System Information
==================
- pyblosxom: 1.5rc2 20100803
- sys.version: 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1
(Apple Inc. build 5465)]
- os.name: posix
- codebase: /Library/Python/2.5/site-
packages/pyblosxom-1.5rc2-py2.5.egg
Checking config.py file
=======================
- properties set: 20
- datadir '/Users/adf/Sites/blog2/entries' exists.
Checking plugin configuration
=============================
- This goes through your plugins and asks each of them to verify
configuration and installation.
----
The following plugins do not support installation verification:
- 'rst' (/path/to/blog/plugins/entryparsers/rst.pyc)
- 'tags' (/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/plugins/tags/tags.py)
Verification complete. Correct any errors and warnings above.
> Date: Wed, 13 Oct 2010 09:52:30 -0400
> From: wi...@bl...
> To: afi...@ho...
> CC: pyb...@li...
> Subject: Re: [pyblosxom-users] Tag Fail
>
> Read through the troubleshooting part of the user manual and see if that
> helps at all:
>
> http://pyblosxom.bluesock.org/1.5/deploy_cgi.html#trouble-shooting
>
> /will
>
>
> On 10/13/2010 03:17 AM, andrew fitting wrote:
> >
> > Will,
> >
> > Thanks for your help. The <string> errors are related to malformed rst files. For now I've removed them and those errors are not there. Now I get this.
> >
> > % pyblosxom-cmd buildtags --config=/path/to/blog/config.py
> > pyblosxom-cmd version 1.5rc2 20100803
> > Adding /path/blog/ to sys.path....
> >
> > There is now a tags.index file
> >
> > Then (as long as the tags plugin is enabled) I get
> > A server error occurred. Please contact the administrator.as a response from the cgi script. Without it, I see blog posts. The only thing I can think of is to try and renderurl and see what the errors are. This is what I tried. If you have any thoughts on why the form dictionary doesn't have a "flav" key, I'd be interested.
> >
> > Thanks,
> > Andrew
> >
> > % pyblosxom-cmd renderurl --config=/path/to/blog/config.py "http://localhost/~me/blog/pyblosxom.cgi"
> > pyblosxom-cmd version 1.5rc2 20100803
> > Adding /Users/adf/Sites/blog/ to sys.path....
> > Trying to import the config module....
> > Traceback (most recent call last):
> > File "/usr/local/bin/pyblosxom-cmd", line 5, in <module>
> > pkg_resources.run_script('pyblosxom==1.5rc2', 'pyblosxom-cmd')
> > File "/opt/local/lib/python2.5/site-packages/pkg_resources.py", line 448, in run_script
> > self.require(requires)[0].run_script(script_name, ns)
> > File "/opt/local/lib/python2.5/site-packages/pkg_resources.py", line 1166, in run_script
> > execfile(script_filename, namespace, namespace)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/EGG-INFO/scripts/pyblosxom-cmd", line 25, in <module>
> > sys.exit(command_line_handler("pyblosxom-cmd", sys.argv))
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/commandline.py", line 431, in command_line_handler
> > return f(command, argv)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/commandline.py", line 311, in render_url
> > p.run_render_one(url, options.headers)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/pyblosxom.py", line 238, in run_render_one
> > response = tools.render_url(config, url, query)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/tools.py", line 979, in render_url
> > p.run(static=True)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/pyblosxom.py", line 176, in run
> > blosxom_handler(self._request)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/pyblosxom.py", line 936, in blosxom_handler
> > renderer.render()
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/renderers/blosxom.py", line 316, in render
> > self.write(self.render_template(self.get_parse_vars(), "head"))
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/renderers/blosxom.py", line 358, in render_template
> > {"entry": entry, "template": template})
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/renderers/blosxom.py", line 384, in _run_callback
> > defaultfunc=lambda x:x)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/Pyblosxom/tools.py", line 776, in run_callback
> > output = func(input)
> > File "/Library/Python/2.5/site-packages/pyblosxom-1.5rc2-py2.5.egg/plugins/tags/tags.py", line 406, in cb_head
> > flavour = form["flav"].value
> > File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/cgi.py", line 558, in __getitem__
> > raise KeyError, key
> > KeyError: 'flav'
> >
> >
> >
> >> Date: Tue, 12 Oct 2010 11:50:18 -0400
> >> From: wi...@bl...
> >> To: afi...@ho...
> >> CC: pyb...@li...
> >> Subject: Re: [pyblosxom-users] Tag Fail
> >>
> >> I can't tell what it is you've copied and pasted here. Can you copy and
> >> paste the command line you used as well as the output?
> >>
> >> The <string>: lines indicate there's an eval somewhere. So something
> >> (probably unrelated to the tags plugin) isn't right.
> >>
> >>
> >> On 10/12/2010 12:57 AM, andrew fitting wrote:
> >>>
> >>> Thanks for the response, Will. I tried that and now I get a slightly different error
> >>>
> >>> pyblosxom-cmd version 1.5rc2 20100803
> >>> Adding /path/to//blog/ to sys.path....
> >>> <string>:28: (ERROR/3) Unknown interpreted text role "super".
> >>> <string>:15: (ERROR/3) Unexpected indentation.
> >>>
> >>>
> >>>
> >>>> Date: Sun, 10 Oct 2010 08:33:13 -0400
> >>>> From: wi...@bl...
> >>>> To: afi...@ho...
> >>>> CC: pyb...@li...
> >>>> Subject: Re: [pyblosxom-users] Tag Fail
> >>>>
> >>>> You need to specify the config file on the command line because
> >>>> otherwise pyblosxom-cmd doesn't know what pyblosxom blog you're talking
> >>>> about.
> >>>>
> >>>> See the pyblosxom-cmd help for more details.
> >>>>
> >>>>
> >>>> On 10/09/2010 05:10 PM, andrew fitting wrote:
> >>>>>
> >>>>> Overall, pyblosxom is working pretty well for me with one exception: tags. The command "pyblosxom-cmd buildtags" always returns
> >>>>>
> >>>>> pyblosxom-cmd version 1.5rc2 20100803
> >>>>> Command 'buildtags' does not exist.
> >>>>> test Tests installation and configuration for a blog.
> >>>>> create Creates directory structure for a new blog.
> >>>>> staticrender Statically renders your blog into an HTML site.
> >>>>> renderurl Renders a single url of your blog.
> >>>>>
> >>>>> I have the install's "pyblosxom-1.5rc2-py2.5.egg/plugins/tags/" on my "plugin_dirs" and the "tags" plugin in "load_plugins". I've tried a couple other variations but none make any difference. I'm obviously missing something obvious but can't figure out what it is. Any suggestions would be appreciated.
> >>>>>
> >>>>> Thanks
> >>>
> >>>
> >>>
> >>>
> >>> ------------------------------------------------------------------------------
> >>> Beautiful is writing same markup. Internet Explorer 9 supports
> >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> >>> Spend less time writing and rewriting code and more time creating great
> >>> experiences on the web. Be a part of the beta today.
> >>> http://p.sf.net/sfu/beautyoftheweb
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> pyblosxom-users mailing list
> >>> pyb...@li...
> >>> https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Beautiful is writing same markup. Internet Explorer 9 supports
> > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> > Spend less time writing and rewriting code and more time creating great
> > experiences on the web. Be a part of the beta today.
> > http://p.sf.net/sfu/beautyoftheweb
> >
> >
> >
> > _______________________________________________
> > pyblosxom-users mailing list
> > pyb...@li...
> > https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
|