MonetDB / pymonetdb

The Python API for MonetDB
https://www.monetdb.org/
Mozilla Public License 2.0
28 stars 20 forks source link

module 'pymonetdb.mapi' has no attribute 'Server' ?? #14

Closed smartinsightsfromdata closed 7 years ago

smartinsightsfromdata commented 7 years ago

Tried to run the following code (as per the example in the doc)

from pymonetdb import mapi
server = mapi.Server()
server.connect(hostname="localhost", port=50000, username="monetdb",
                 password="monetdb", database="demo", language="sql")

But I got:

AttributeError                            Traceback (most recent call last)
<ipython-input-1-f3ddc95aff5b> in <module>()
      1 from pymonetdb import mapi
----> 2 server = mapi.Server()
      3 server.connect(hostname="localhost", port=50000, username="monetdb",
      4                  password="monetdb", database="demo", language="sql")

AttributeError: module 'pymonetdb.mapi' has no attribute 'Server'

What do I do wrong?

gijzelaerr commented 7 years ago

that should be mapi.Connection().

smartinsightsfromdata commented 7 years ago

@gijzelaerr I arrived at that conclusion looking at the tests. It would be good to amend the documentation though...

gijzelaerr commented 7 years ago

already done.