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

Database file will open if provided on cli start, but not with .open #12

Closed
j-bennet opened this issue Nov 30, 2018 · 1 comment · Fixed by #32
Closed

Database file will open if provided on cli start, but not with .open #12

j-bennet opened this issue Nov 30, 2018 · 1 comment · Fixed by #32

Comments

@j-bennet
Copy link
Contributor

On cli start:

--- ~ » litecli ~/repos/engineering/rebuilds.sqlite
Version: 0.0.1
Mail: https://groups.google.com/forum/#!forum/litecli-users
Github: https://github.com/dbcli/litecli
/Users/irina/repos/engineering/rebuilds.sqlite>

When using .open:

(none)> .open ~/repos/engineering/rebuilds.sqlite
unable to open database file
(none)> .open "~/repos/engineering/rebuilds.sqlite"
unable to open database file
(none)> .open "/Users/irina/repos/engineering/rebuilds.sqlite"
unable to open database file

Exception in log:

2018-11-30 08:49:12,254 (3880/MainThread) litecli.main ERROR - traceback: 'Traceback (most recent call last):\n File "/Users/irina/.pyenv/versions/3.6.5/lib/python3.6/site-packages/litecli/main.py", line 455, in one_iteration\n for title, cur, headers, status in res:\n File "/Users/irina/.pyenv/versions/3.6.5/lib/python3.6/site-packages/litecli/sqlexecute.py", line 110, in run\n for result in special.execute(cur, sql):\n File "/Users/irina/.pyenv/versions/3.6.5/lib/python3.6/site-packages/litecli/main.py", line 197, in change_db\n self.sqlexecute.connect(database=arg)\n File "/Users/irina/.pyenv/versions/3.6.5/lib/python3.6/site-packages/litecli/sqlexecute.py", line 57, in connect\n conn = sqlite3.connect(database=db, isolation_level=None)\nsqlite3.OperationalError: unable to open database file\n'

@meeuw
Copy link
Contributor

meeuw commented Nov 30, 2018

Hmmm this is caused by what I mean by #14 (expanduser), ~ isn't expanded in the litecli

@meeuw meeuw mentioned this issue Dec 4, 2018
2 tasks
@amjith amjith closed this as completed in #32 Dec 4, 2018
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

Successfully merging a pull request may close this issue.

2 participants