[quills-dev] metaWeblogAPI and delicious daily post
"Jürgen R. Plasser" plasser at liwest.atTue Nov 7 19:45:37 UTC 2006
- Previous message: [quills-dev] metaWeblogAPI and delicious daily post
- Next message: [quills-dev] Re: 1.5 final?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Tim, Tim Hicks schrieb: > Jürgen R. Plasser wrote: >> Jürgen R. Plasser schrieb: >>> Hi all, >>> >>> has anybody ever tried to get the delicious daily post running with >>> Quills' metaWeblogAPI? >>> (https://secure.del.icio.us/settings/userid/blogging/posting) >>> >>> I get the follwing traceback: >>> >>> Traceback (innermost last): >>> Module ZPublisher.Publish, line 115, in publish >>> Module ZPublisher.mapply, line 88, in mapply >>> Module ZPublisher.Publish, line 41, in call_object >>> Module Products.Quills.MetaWeblogAPI, line 80, in newPost >>> Module Products.Quills.MetaWeblogAPI, line 312, in >>> extractDescriptionFromBody >>> TypeError: expected string or buffer >>> >>> I can't get over this because I don't know what delicious is sending. >>> Any ideas how I can debug this? >>> >>> >> I've got it working! I added some quick hack for that. > > What was the problem? What was the hack? The problem was located in the extractDescriptionFromBody function (line 312, MetaWeblogAPI.py) where the excerptExtractor regex needs a string and the body provided seems not to be a regular string. So I converted body to a string and wrapped the function in a try-except (you don't need this, but I tried this before I did the body-to-string thing). body = str(body) try: excerpt = self.excerptExtractor.search(body) except Exception, e: self.plone_log("Cannot extract Excerpt: %s" % e) excerpt = None As I said, it's just a quick hack, but it works (for me). The code itself will not be of much value, but maybe there's something wrong with how the body is fetched? Performancing ist still working too! Hope this helps! -Jürgen
- Previous message: [quills-dev] metaWeblogAPI and delicious daily post
- Next message: [quills-dev] Re: 1.5 final?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the quills-dev mailing list