2

I've been trying the freebase api and the followingquestion regarding setting up a cursor.

I have the following code that does not work:

import freebase

def my_query():
    query = [{
        "name" : [],
        "type" : "/music/artist",
        "/common/topic/image":[{}],
        "limit" : 10
        }]

    results = freebase.mqlreaditer(query, extended=True)
    for r in results:
        print r

if __name__ == "__main__":
    my_query()

I get the following error: TypeError: mqlreaditer() got an unexpected keyword argument 'extended'.

Am I missing something?

Community
  • 1
  • 1
ip.
  • 3,306
  • 6
  • 32
  • 42
  • Apparently, `mqlreaditer` doesn't take the `extended` argument. Maybe you should post it as a comment on the previous question (and not accept an answer until you find it works for you). – Petr Viktorin Oct 08 '11 at 11:28

1 Answers1

0

No, you're not missing something. Someone screwed up in doing the 1.0.8 release and made an incompatible change to the API, probably due to confusion with SVN branching.

If not don't need MQL extensions, just drop that parameter. If you need the functionality, you'll have to fall back to 1.0.6 until someone fixes the problem and does a new release.

 sudo easy_install freebase==1.0.6
Tom Morris
  • 10,490
  • 32
  • 53