-1

这是错误。我在应用程序的日志中找到了这个。它可能与我的应用程序运行时有关。

2012-12-03 04:06:01.803 /favicon.ico 200 22ms 1kb Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.14 Safari/537.17
    117.220.209.197 - - [03/Dec/2012:04:06:01 -0800] "GET /favicon.ico HTTP/1.1" 200 1406 - "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.14 Safari/537.17" "rprpfind.appspot.com" ms=23 cpu_ms=0 
    2012-12-03 04:06:01.265 / 500 350ms 0kb Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.14 Safari/537.17
    117.220.209.197 - - [03/Dec/2012:04:06:01 -0800] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.14 Safari/537.17" "rprpfind.appspot.com" ms=350 cpu_ms=80 loading_request=1 instance=00c61b117ca3c72030422ae0cb1dbc6ca386f09a
    E 2012-12-03 04:06:01.262
    /base/data/home/apps/s~rprpfind/1.363605572194595527/framework/bottle.py:96: DeprecationWarning: Python 2.5 support may be dropped in future versions of Bottle.
    E 2012-12-03 04:06:01.262
      warnings.warn(msg, DeprecationWarning)
    E 2012-12-03 04:06:01.262
    <type 'exceptions.SyntaxError'>: invalid syntax (dammit.py, line 281)
    Traceback (most recent call last):
      File "/base/data/home/apps/s~rprpfind/1.363605572194595527/main.py", line 6, in <module>
        from bs4 import BeautifulSoup
      File "/base/data/home/apps/s~rprpfind/1.363605572194595527/bs4/__init__.py", line 29, in <module>
        from .builder import builder_registry
      File "/base/data/home/apps/s~rprpfind/1.363605572194595527/bs4/builder/__init__.py", line 4, in <module>
        from bs4.element import (
      File "/base/data/home/apps/s~rprpfind/1.363605572194595527/bs4/element.py", line 5, in <module>
        from bs4.dammit import EntitySubstitution
    I 2012-12-03 04:06:01.265
    This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
4

1 回答 1

1

看起来您正在尝试部署到 Python 2.5 应用程序引擎实例。

BeautifulSoup 4 需要 Python 2.7。将您的代码转换为使用 BeautifulSoup 版本 3,或将您的应用引擎实例升级到 Python 2.7。

于 2012-12-03T12:42:52.707 回答