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

SqlAlchemy Backend Initialization error for sqlite databases #71

Open
oaken-source opened this issue Aug 19, 2014 · 2 comments
Open

SqlAlchemy Backend Initialization error for sqlite databases #71

oaken-source opened this issue Aug 19, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@oaken-source
Copy link

In SQLite, the "CREATE DATABASE %s" and "USE %s" queries fail with syntax errors.

example:

SqlAlchemyBackend('sqlite:///' + absolute_path_to_dbfile, initialize=True)

fails with

sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file None None

This is caused by sqlalchemy_backend.py:138, where db_url should be db_full_url.

Now the error is

localhost - - [2014-08-19 09:36:18,563] Failed DB creation: (OperationalError) near DATABASE": syntax error 'CREATE DATABASE auth.sqlite' ()
sqlalchemy.exc.OperationalError: (OperationalError) near "USE": syntax error 'USE auth.sqlite' ()

The CREATE DATABASE error is caught via exception handling, but the USE query error is not.

Is it possible to make the SqlAlchemy backend work with file based sqlite?

I am using the latest bottle-cork package available from pip.

@FedericoCeratto FedericoCeratto added this to the v0.11 milestone Aug 19, 2014
@FedericoCeratto FedericoCeratto self-assigned this Aug 19, 2014
@FedericoCeratto FedericoCeratto modified the milestones: v0.11, v0.12 Aug 19, 2014
@FedericoCeratto
Copy link
Owner

Thanks for the bug report, I'll add file-based sqlite functional testing and fix the issue.

@j0lvera
Copy link

j0lvera commented Jan 4, 2016

How far we are from releasing v0.12 and patch this?

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

No branches or pull requests

3 participants