执行status.py报错, 啥原因?

45 views
Skip to first unread message

James Xu

unread,
Nov 12, 2011, 3:34:41 AM11/12/11
to BeanDB
james@utopia:~/local/svn/beansdb/python$ python status.py
Traceback (most recent call last):
File "status.py", line 36, in <module>
status(db)
File "status.py", line 20, in status
for s in db.servers.values():
AttributeError: 'NoneType' object has no attribute 'servers'

Davies Liu

unread,
Nov 12, 2011, 10:00:59 PM11/12/11
to bea...@googlegroups.com
dbclient.py 需要先初始化,调用 dbclient.init(CONFIG)

2011/11/12 James Xu <xumingmin...@gmail.com>:

--
- Davies

James Xu

unread,
Nov 13, 2011, 5:46:18 AM11/13/11
to BeanDB
恩,谢了。 为啥不直接加在status.py里面呢?

On Nov 13, 11:00 am, Davies Liu <davies....@gmail.com> wrote:
> dbclient.py 需要先初始化,调用 dbclient.init(CONFIG)
>
> 2011/11/12 James Xu <xumingming64398...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages