Skip to content
New issue

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

README describes .save method but no such method exists #3

Open
talwrii opened this issue Aug 11, 2016 · 2 comments
Open

README describes .save method but no such method exists #3

talwrii opened this issue Aug 11, 2016 · 2 comments

Comments

@talwrii
Copy link

talwrii commented Aug 11, 2016

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 0x7f8679400290>

In [3]: d = _

In [4]: d.save()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-7e84cd160ba3> in <module>()
----> 1 d.save()

/home/tom/.local/lib/python2.7/site-packages/jsondb/core.pyc in __getattr__(self, name)
     92         cls = self.get_datatype()
     93         try:
---> 94             attr = getattr(cls, name)
     95         except:
     96             raise

AttributeError: type object 'dict' has no attribute 'save'

In [5]: print jsondb.version
0.1.2
@shaung
Copy link
Owner

shaung commented Aug 23, 2016

Confirmed.
Cannot believe that the save method` was never actually implemented :(
Sorry for the inconvenience.

@directrix1
Copy link

commit method can be used to save changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants