[Twisted-Python] Woven using wrong model adapter

Kevin Turner acapnotic at twistedmatrix.com
Mon May 26 21:13:05 EDT 2003

I have:


class Page(page.Page):
    def wmfactory_report(self, request):
        if sometimes:
            return deferredInterestChangeReport()
            return ''

If the first page I serve after starting the server gets an
InterestChangeReport, then everything works just fine.  However, if the
first page served gets '', then any future page that gets an
InterestChangeReport dies with an exception:  "the submodel was not
found in [<twisted.web.woven.model.StringModel instance at 0x85167c4:
wrapped data: <InterestChangeReport instance...>"

So why does woven persist in using the StringModel adapter in this case,
and how can I get it to stop?

Don't know if this is related or not, but the log shows messages like:
"Warning: There was no parent for node [...]; node not mutated."  Is
that something I should be concerned about?


 - Kevin

The moon is waning crescent, 16.8% illuminated, 25.6 days old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030526/bdd105c7/attachment.pgp 

More information about the Twisted-Python mailing list