We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.keys()
Repro
ipython Python 2.7.12 (default, Jun 29 2016, 08:18:26) Type "copyright", "credits" or "license" for more information. IPython 2.4.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. [TerminalIPythonApp] WARNING | File not found: '/home/tom/.pythonrc.py' In [1]: import jsondb In [2]: jsondb.create({}, url='/tmp/test.db') Out[2]: <jsondb.JsonDB at 0x7f92c07bf1d0> In [3]: d = _ In [4]: d.keys() Out[4]: [] In [5]: d['a'] = 1 In [6]: d.keys() Out[6]: ['a'] In [7]: d.close() In [8]: d = jsondb.load(url='/tmp/test.db') In [9]: In [9]: d.keys() --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-9-8bc560538296> in <module>() ----> 1 d.keys() /home/tom/.local/lib/python2.7/site-packages/jsondb/core.pyc in __getattr__(self, name) 90 91 def __getattr__(self, name): ---> 92 cls = self.get_datatype() 93 try: 94 attr = getattr(cls, name) /home/tom/.local/lib/python2.7/site-packages/jsondb/core.pyc in get_datatype(self) 282 283 def get_datatype(self): --> 284 return get_datatype_class(self.datatype) 285 286 def data(self, update=False): /home/tom/.local/lib/python2.7/site-packages/jsondb/datatypes.pyc in get_datatype_class(_type) 47 if _type == NIL: 48 return None ---> 49 cls = DATA_INITIAL[_type].__class__ 50 return cls 51 KeyError: None In [10]: d.items() Out[10]: [('a', 1)]
The text was updated successfully, but these errors were encountered:
b20d4bf
Fixed in trunk! Please reopen this issue If it's still broken.
Sorry, something went wrong.
Add tests for #4
e859e76
No branches or pull requests
Repro
The text was updated successfully, but these errors were encountered: