[ase-users] database update error

Korina Kuhar Kokuha at fysik.dtu.dk
Mon Jun 6 14:02:11 CEST 2016


Hi Liu,

From what it seems to me, your database is too old (you have updated the ase version but not your database).
I suggest you try typing in terminal:
python -m ase.db.convert structure.db

If it doesn't work it could also be that it recognizes you have some numbers saved as strings (in that case python -m ase.db.convert -S structure.db  should do the trick).

Hope it helps.

Best,
Korina.

Korina Kuhar
PhD student
DTU Physics


Technical University of Denmark
        [http://www.dtu.dk/%7E/media/DTU_Generelt/Andet/DTU_email_logo_01.gif]

Department of Physics
Fysikvej
Building 307
2800 Kgs. Lyngby
Denmark
Direct +45 45253293
kokuha at fysik.dtu.dk<mailto:kokuha at fysik.dtu.dk>
www.fysik.dtu.dk<http://www.fysik.dtu.dk>
________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at listserv.fysik.dtu.dk] on behalf of 刘晓彤 via ase-users [ase-users at listserv.fysik.dtu.dk]
Sent: Monday, June 06, 2016 1:28 PM
To: ase-users at listserv.fysik.dtu.dk
Subject: [ase-users] database update error

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/df838319/attachment.html>


More information about the ase-users mailing list