in orm.py file, and in line 22.
db=kw['db'] should change to
db = kw['database']
since in config_default.py , you defines
configs = { 'debug': True, 'db': { 'host': '123.206.28.72', 'port': 3306, 'user': 'root', 'password': '12345', 'database': 'awesome' }, 'session': { 'secret': 'AwEsOmE' } }
Traceback (most recent call last):
File "app.py", line 154, in
loop.run_until_complete(init(loop))
File "/usr/local/python3/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "app.py", line 142, in init
yield from orm.create_pool(loop=loop, **configs.db)
File "/home/wwwroot/LNMP/python_web/www/orm.py", line 20, in create_pool
user=kw['awesome_user'],
KeyError: 'awesome_user'
in orm.py file, and in line 22.
db=kw['db']
should change todb = kw['database']
since in config_default.py , you definesconfigs = { 'debug': True, 'db': { 'host': '123.206.28.72', 'port': 3306, 'user': 'root', 'password': '12345', 'database': 'awesome' }, 'session': { 'secret': 'AwEsOmE' } }
I runned through the code.