Plone - Syntax Error when doing hello world tutorial

236 views Asked by At

I am following this "hello world" tutorial on plone.org

But I stuck in one moment due to error:

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 

I dumped complete [very very long] console output here.

What causes this and how to avoid it?

EDIT:

Here the bootstrap.py

And also buildout.cfg which in the same folder

# 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

There are 1 answers

2
tisto On BEST ANSWER

It seems your bootstrap.py is outdated and tries to access a URL that does not exist any longer. You can update your bootstrap like this:

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