__init__() got an unexpected keyword argument 'host'

77 views
Skip to first unread message

Xiaoli

unread,
Dec 17, 2011, 1:48:06 PM12/17/11
to M/DB Community Forum
Hi I am a starter of M/DB and EWD. I am going through the E/WD demo
tutorial and am using boto to connect to M/DB in python. But an error
message occurs:

mdb = boto.connect_sdb("rob","1234567",path="/mdb/request.mgwsi",
is_secure=False, host="192.168.1.104")

__init__() got an unexpected keyword argument 'host'

Is this caused by database configuration? I used the ewd installation
kit to get all software needed

rtweed

unread,
Dec 17, 2011, 1:53:21 PM12/17/11
to M/DB Community Forum
I think the boto interface has changed since I wrote that original
documentation. Here's an example of how I've been able to connect and
run a query:

import boto
import boto.sdb
import boto.sdb.regioninfo
mdbRegion =
boto.sdb.regioninfo.SDBRegionInfo(name='mdb',endpoint='127.0.0.1')
mdb=boto.connect_sdb('myusername','myprivatekey',isSecure=False,region=mdbR
egion,path='/
mdb/request.mgwsi')
query="SELECT * FROM test"
results=mdb.select("test",query)
print results

[{u'attr2': u'value3', u'attr1': [u'value1', u'value2', u'value3']}]

See if something similar works for you also

Rob

Reply all
Reply to author
Forward
0 new messages