Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #103 (closed defect: worksforme)

Opened 14 years ago

Last modified 12 years ago

Comment on docs/wiki20/page2.html

Reported by: turbogears@… Owned by: anonymous
Priority: normal Milestone:
Component: Documentation Version:
Severity: normal Keywords:


Running python 2.4.1 on OpenBSD 3.8 with the latest docutils snapshot still nets me the error discussed at the bottom of page2:

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run
  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.8a3-py2.4.egg/turbogears/controllers.py", line 121, in newfunc
    output = func(self, *args, **kw)
  File "/root/wiki20/wiki20/controllers.py", line 10, in index
    content = publish_parts(page.data, writer_name="html")["html_body"]
KeyError: 'html_body'

(yes, I'm working as root. This is one of my test boxes for playing.)

Change History

comment:1 Changed 14 years ago by turbogears@…

  • Status changed from new to closed
  • Resolution set to worksforme

Strange. I started taking things apart to see what was going wrong and how I could fix it. I changed my code to this:

    def index(self, pagename="FrontPage"):
        page = Page.byPagename(pagename)
        content = publish_parts(page.data, writer_name="html")
        print dir(content)
        return dict(data='Whee!', pagename=page.pagename)
        #return dict(data=content, pagename=page.pagename)

Which obviously worked, then changed that print to "print content.keys", then I changed the code back to what it was originally and it worked. This is all without restarting my TG instance between not working and working. Yes, I did restart it before that, specifically when I upgraded docutils to the snapshot.

I guess this can be closed, but it's still odd...

Note: See TracTickets for help on using tickets.