Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

DB issue in fresh install #5

Closed
taliaga opened this issue Sep 8, 2017 · 2 comments
Closed

DB issue in fresh install #5

taliaga opened this issue Sep 8, 2017 · 2 comments
Assignees

Comments

@taliaga
Copy link

taliaga commented Sep 8, 2017

$ python wifi_rest.py
Traceback (most recent call last):
  File "wifi_rest.py", line 261, in <module>
    _init_db()
  File "wifi_rest.py", line 52, in _init_db
    db = _get_db()
  File "wifi_rest.py", line 40, in _get_db
    db = g._database = sqlite3.connect(app.config['DB_INSTANCE'])
sqlite3.OperationalError: unable to open database file
@k33rs k33rs self-assigned this Sep 8, 2017
@k33rs
Copy link
Contributor

k33rs commented Sep 8, 2017

are you running the application using the interpreter script?
It's supposed to run as sudo.

Also, is the project located at '/home/pi/eWine-connectivity-manager'?
If not, that's why you can't open the .db file, whose path is '/home/pi/eWine-connectivity-manager/wifi_manager/schema/schema.db'

@k33rs
Copy link
Contributor

k33rs commented Sep 11, 2017

Removed the hardcoded absolute path, now the database should be opened regardless of the project path. You can see the changes in the last commit.

@k33rs k33rs closed this as completed Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants