[ase-users] database update error

刘晓彤 liuxiaotong15 at mails.ucas.ac.cn
Mon Jun 6 13:28:33 CEST 2016


hi, all


I want to update my database using the following code:



from ase.db import connect 

sCon = connect('structure.db')

if __name__ == '__main__':

    sCon.update(25, status='cfg_changed')




and 'status' is the key I add myself. But I met a very strange error:



  File "analysis.py", line 12, in <module>

    sCon.update(25, status='cfg_changed')

  File "/nfs1/icc-lxt/python2.7/lib/python2.7/site-packages/ase/db/core.py", line 119, in new_method

    return method(self, *args, **kwargs)

  File "/nfs1/icc-lxt/python2.7/lib/python2.7/site-packages/ase/db/core.py", line 447, in update

    add_key_value_pairs)

  File "/nfs1/icc-lxt/python2.7/lib/python2.7/site-packages/ase/db/sqlite.py", line 550, in _update

    rows = [self._get_row(id) for id in ids]

  File "/nfs1/icc-lxt/python2.7/lib/python2.7/site-packages/ase/db/sqlite.py", line 316, in _get_row

    values = self._old2new(values)

  File "/nfs1/icc-lxt/python2.7/lib/python2.7/site-packages/ase/db/sqlite.py", line 379, in _old2new

    assert False

AssertionError


The update function works well sometime, but for this code, it went wrong every time...


could you please help me to figure out the error? thank you so much~~

liu xiaotong


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20160606/d40ddea5/attachment.html>


More information about the ase-users mailing list