Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in [ orm.py ] files in all branchs #21

Open
willduan opened this issue Aug 28, 2016 · 1 comment
Open

Errors in [ orm.py ] files in all branchs #21

willduan opened this issue Aug 28, 2016 · 1 comment

Comments

@willduan
Copy link

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' } }

I runned through the code.

@baitongda
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants