BeutifulSoup4をGAE+Python2.7で使用した時のエラー

bs4の内部でlxmlを使用するので、そのあたりがエラーっぽい。

以下のページによるとpython2.7だとlxmlは使えるはずなんだけど。

https://developers.google.com/appengine/docs/python/tools/libraries27

どうしてもbs4を使いたい理由があるわけじゃないので、BeautifulSoup 3.2.1を使うことにして回避した。

Traceback (most recent call last):

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/kay/app.py", line 371, in get_response
    response = view_func(request, **values)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/kay/handlers/__init__.py", line 34, in __call__
    return func(**kwargs)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/kay/handlers/task.py", line 30, in post
    run(self.request.data)

  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/deferred/deferred.py", line 135, in run
    return func(*args, **kwds)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/gohan/views.py", line 57, in task
    image_source = get_image_source_from_cookpad(id)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/gohan/views.py", line 76, in get_image_source_from_cookpad
    soup = BeautifulSoup(res)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/bs4/__init__.py", line 168, in __init__
    self._feed()

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/bs4/__init__.py", line 181, in _feed
    self.builder.feed(self.markup)

  File "/base/data/home/apps/s~sample-app/1.359510849632809115/bs4/builder/_lxml.py", line 171, in feed
    self.parser.feed(markup)

  File "parser.pxi", line 1077, in lxml.etree._FeedParser.feed (third_party/apphosting/python/lxml/src/lxml/lxml.etree.c:76196)

ParserError: Unicode parsing is not supported on this platform