0
我嘗試使用web.py框架的monetdb。monetdb與web.py(提高UnknownDB,dbn問題)
這是我的實現代碼:
import web
render = web.template.render('templates/')
db = web.database(dbn = 'monetdbd', user = 'monetdb', pw = 'monetdb', db = 'test')
urls = (
'/','index'
)
class index:
def GET(self,name):
xSelect = db.select(x)
return render.index(xSelect)
if __name__ == "__main__":
app = web.application(urls,globals())
app.run()
,同時運行蟒蛇code.py
Traceback (most recent call last):
File "code.py", line 4, in <module>
db = web.database(dbn = 'monetdbd', user = 'monetdb', pw = 'monetdb', db = 'test')
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 1145, in database
raise UnknownDB, dbn
web.db.UnknownDB: monetdbd
數據庫服務器運行的是我有以下錯誤信息:
[email protected]:~/Desktop/Monetdb/web$ ps ucx| grep -i monetdb
bmartis 2482 0.0 0.0 63956 2476 ? Ssl Jun29 0:33 monetdbd
[email protected]:~/Desktop/Monetdb/web$
我不明白db定義在這裏有什麼問題。什麼是正確的語法或monetdb沒有支持這個?
感謝您的更新。 –