我刚试过快速入门:" Hello,World!" bottle.py教程(http://bottlepy.org/docs/dev/tutorial.html#quickstart-hello-world)
但是我收到了这种错误:
Traceback (most recent call last):
File "first.py", line 1, in <module>
from bottle import route, run
File "/home/sid/bottle.py", line 3, in <module>
@route('/hello/<name>')
NameError: name 'route' is not defined
答案 0 :(得分:3)
不要为自己的文件bottle.py
命名,因为它会影响实际的bottle
库。