Plone - 语法在执行hello world教程时出错

时间:2015-06-11 13:58:22

标签: syntax-error plone

我关注this"你好世界" plone.org上的教程

但由于错误,我陷入了one moment

root@junvb:~/Plone/python_dev/env-27# cd hello_world
root@junvb:~/Plone/python_dev/env-27/hello_world# ../bin/python bootstrap.py
Traceback (most recent call last):
File "bootstrap.py", line 70, in <module>
exec urllib2.urlopen(setup_url).read() in ez
File "<string>", line 1
<!DOCTYPE html>
^
SyntaxError: invalid syntax 

我抛弃了完整的[非常长的]控制台输出here

是什么导致这种情况以及如何避免它?

编辑:

这里是bootstrap.py

还有buildout.cfg,它位于同一个文件夹中

# This is here just for backward compatibility
[buildout]
extends =
    src/base.cfg
    src/readline.cfg
    src/libjpeg.cfg
    src/python27.cfg
    src/pypy.cfg
    src/pypy3.cfg
    src/links.cfg

parts =
    ${buildout:base-parts}
    ${buildout:readline-parts}
    ${buildout:libjpeg-parts}
    ${buildout:python27-parts}
    ${buildout:pypy-parts}
    ${buildout:pypy3-parts}
    ${buildout:links-parts}

python-buildout-root = ${buildout:directory}/src

# we want our own eggs directory and nothing shared from a
# ~/.buildout/default.cfg to prevent any errors and interference
eggs-directory = eggs

[install-links]
prefix = /opt/local

1 个答案:

答案 0 :(得分:3)

您的bootstrap.py似乎已过时,并尝试访问不再存在的URL。您可以像这样更新引导程序:

$ rm bootstrap.py
$ wget http://downloads.buildout.org/1/bootstrap.py
$ python2.7 bootstrap.py
$ bin/buildout