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

Error writing the sqlite database file #172

Open
ganapatinatarajan opened this issue May 23, 2019 · 0 comments
Open

Error writing the sqlite database file #172

ganapatinatarajan opened this issue May 23, 2019 · 0 comments

Comments

@ganapatinatarajan
Copy link

I am using ubuntu 18.04 on Windows subsystem for linux/python 2.7 and sqlalchemy 0.7.
I am running the example on 17 atom LJ system:
from pele.systems import LJCluster
natoms=17
system=LJCluster(natoms)
database=system.create_database('lj17.sqlite')
bh=system.get_basinhopping(database)
bh.run(10)

Doing this writes an empty database file and gives the error below:
traceback (most recent call last):
File "bh.py", line 4, in
database=system.create_database('lj17.sqlite')
File "/home/gn203/.local/lib/python2.7/site-
packages/pele/systems/basesystem.py", line 234, in create_database
db = Database(**kwargs)
File "/home/gn203/.local/lib/python2.7/site-packages/pele/storage/database.py", line 432, in init
self._check_schema_version()
File "/home/gn203/.local/lib/python2.7/site-packages/pele/storage/database.py", line 477, in _check_schema_version
"%d (%d). Please use migrate_db.py in pele/scripts to update database"%(schema, _schema_version))
IOError: database schema outdated, current (newest) version: 0 (2). Please use migrate_db.py

Running migrate_db.py on the empty lj17.sqlite error file generates a further error:

current version: 0
newest version: 2
migrating from database version 0 to 1
Traceback (most recent call last):
File "/home/gn203/pkg/pele-master/scripts/migrate_db.py", line 63, in
migrate(dbfile)
File "/home/gn203/pkg/pele-master/scripts/migrate_db.py", line 47, in migrate
schema = migrate_script[schema](connection, schema)
File "/home/gn203/pkg/pele-master/scripts/migrate_db.py", line 13, in from_0_to_1
connection.execute("ALTER TABLE tbl_minima ADD fvib FLOAT;")
File "/home/gn203/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1294, in execute
params)
File "/home/gn203/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1471, in _execute_text
statement, parameters
File "/home/gn203/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1535, in _execute_context
context)
File "/home/gn203/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1528, in _execute_context
context)
File "/home/gn203/.local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 325, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) no such table: tbl_minima 'ALTER TABLE tbl_minima ADD fvib FLOAT;' ()

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

1 participant