‘Empty’ results from MQL Query. Freebase Schema: /film/film/starring & /film/actor/film
- by user1879631
First post here, so I hope this is enough detail.
I started using freebase-python today to get film information for a program that I’m working on. One thing that I need to grab is a list of actors that starred in a film. I’ve followed some tutorials and guides on the way to do this, and can get a list of films for a director or the director of a film, but when I try to do the same with an actor or a film’s cast, I get ‘null’ results.
I have the same problem in both Python and the Freebase MQL Query Editor, and you can see what I've tried below. Links to all of the examples below written in the editor can be found here, as Stack Overflow wouldn't let me post links underneath each example on my first post!
Working director query in Python:
import freebase
fb = freebase.mqlread
q = {'type':'/film/film', 'name':'Inception', 'directed_by':[]}
fb(q)
Working director's filmography query in Python:
import freebase
fb = freebase.mqlread
q = {'type':'/film/director', 'name': 'Christopher Nolan', 'film':[]}
fb(q)
Based on these tests, I tried to do the same with actors, but with odd results:
Not working cast list query in Python:
import freebase
fb = freebase.mqlread
q = {'type':'/film/film', 'name':'Inception', 'starring':[]}
fb(q)
Not working actor's filmography query in Python:
import freebase
fb = freebase.mqlread
q = {'type':'/film/actor', 'name':'Leonardo DiCaprio', 'film':[]}
fb(q)
Strangely, I get an accurate number of actors/films back, but no names. Does anyone have any idea what the problem might be? Thanks a lot, I'd appreciate any advice.