Python 3.4.1 and blitzdb issue

Juan Christian juan0christian at
Wed Oct 22 18:34:20 CEST 2014

Testing code:

CODE ---------------------


import requests
from blitzdb import Document, FileBackend

API_URL = ''
API_KEY = 'ddf3xxxxxxxx0289'

class Actor(Document):

def get_actor(_id):
    r = requests.get('{}/person/{}?api_key={}'.format(API_URL, str(_id),
    return r.json()

actor_1 = Actor(get_actor(1))
actor_2 = Actor(get_actor(2))

backend = FileBackend("db.blitz")

print(backend.get(Actor,{'imdb_id' : 'nm0000184'}))
print(backend.get(Actor,{'imdb_id' : 'nm0000434'}))

OUTPUT ---------------------

Warning: cjson could not be imported, CJsonSerializer will not be available.
Traceback (most recent call last):
  File ".\", line 27, in <module>
    print(backend.get(Actor,{'imdb_id' : 'nm0000184'}))
  File "C:\Python34\lib\site-packages\blitzdb\backends\file\",
line 456, in get
    raise cls.DoesNotExist
blitzdb.document.DoesNotExist: DoesNotExist(Actor)

QUESTION ---------------------

Why the output says that Actor doesn't exists when I already added it here
'' and ''
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list