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

Getting "601:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (sqlite3.OperationalError) unable to open database file" #173

Closed
pankajshrestha opened this issue Mar 10, 2016 · 12 comments

Comments

@pankajshrestha
Copy link

Hello, I am trying to install Panoramix on a Windows 7 with Python 2.7.11, followed the instructions to install, got following error:

2016-03-10 11:18:47,601:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (sqlite3.OperationalError) unable to open database file'

Installation Details:

c:\Python27\Scripts>pip install panoramix
Collecting panoramix
Downloading panoramix-0.7.0.tar.gz (22.9MB)
100% |################################| 22.9MB 40kB/s
Collecting alembic<0.9.0,>=0.8.2 (from panoramix)
Downloading alembic-0.8.5.tar.gz (959kB)
100% |################################| 962kB 696kB/s
Collecting cryptography<2.0.0,>=1.1.1 (from panoramix)
Downloading cryptography-1.2.3-cp27-none-win32.whl (882kB)
100% |################################| 890kB 769kB/s
Collecting flask-appbuilder<2.0.0,>=1.4.5 (from panoramix)
Downloading Flask-AppBuilder-1.6.0.tar.gz (1.1MB)
100% |################################| 1.1MB 613kB/s
Collecting flask-login==0.2.11 (from panoramix)
Downloading Flask-Login-0.2.11.tar.gz
Collecting flask-migrate<2.0.0,>=1.5.1 (from panoramix)
Downloading Flask-Migrate-1.8.0.tar.gz
Collecting flask-script<3.0.0,>=2.0.5 (from panoramix)
Downloading Flask-Script-2.0.5.tar.gz (42kB)
100% |################################| 51kB 1.2MB/s
Collecting flask-sqlalchemy==2.0 (from panoramix)
Downloading Flask-SQLAlchemy-2.0.tar.gz (93kB)
100% |################################| 102kB 1.4MB/s
Collecting flask-testing<0.5.0,>=0.4.2 (from panoramix)
Downloading Flask-Testing-0.4.2.tar.gz (40kB)
100% |################################| 51kB 1.4MB/s
Collecting flask<1.0.0,>=0.10.1 (from panoramix)
Downloading Flask-0.10.1.tar.gz (544kB)
100% |################################| 552kB 1.0MB/s
Collecting gunicorn<20.0.0,>=19.3.0 (from panoramix)
Downloading gunicorn-19.4.5-py2.py3-none-any.whl (112kB)
100% |################################| 122kB 1.3MB/s
Collecting markdown<3.0.0,>=2.6.2 (from panoramix)
Downloading Markdown-2.6.5.tar.gz (301kB)
100% |################################| 307kB 1.3MB/s
Collecting numpy<2,>=1.9 (from panoramix)
Downloading numpy-1.10.4-cp27-none-win32.whl (6.4MB)
100% |################################| 6.4MB 140kB/s
Collecting pandas<0.17,==0.16.2 (from panoramix)
Downloading pandas-0.16.2-cp27-none-win32.whl (3.6MB)
100% |################################| 3.6MB 224kB/s
Collecting parsedatetime<2.0.0,>=1.5 (from panoramix)
Downloading parsedatetime-1.5-py2-none-any.whl (50kB)
100% |################################| 51kB 1.2MB/s
Collecting pydruid<0.3,>=0.2.2 (from panoramix)
Downloading pydruid-0.2.3.tar.gz
Collecting python-dateutil<3.0.0,>=2.4.2 (from panoramix)
Downloading python_dateutil-2.5.0-py2.py3-none-any.whl (199kB)
100% |################################| 204kB 914kB/s
Collecting requests<3.0.0,>=2.7.0 (from panoramix)
Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
100% |################################| 501kB 906kB/s
Collecting sqlalchemy-utils<0.32.0,>=0.31.3 (from panoramix)
Downloading SQLAlchemy-Utils-0.31.6.tar.gz (112kB)
100% |################################| 112kB 1.5MB/s
Collecting sqlalchemy<2.0.0,>=1.0.8 (from panoramix)
Downloading SQLAlchemy-1.0.12.tar.gz (4.7MB)
100% |################################| 4.8MB 187kB/s
Collecting sqlparse<0.2.0,>=0.1.16 (from panoramix)
Downloading sqlparse-0.1.19.tar.gz (58kB)
100% |################################| 61kB 2.0MB/s
Collecting werkzeug<0.12.0,==0.11.2 (from panoramix)
Downloading Werkzeug-0.11.2-py2.py3-none-any.whl (304kB)
100% |################################| 307kB 1.3MB/s
Collecting Mako (from alembic<0.9.0,>=0.8.2->panoramix)
Downloading Mako-1.0.3.tar.gz (565kB)
100% |################################| 573kB 1.0MB/s
Collecting python-editor>=0.3 (from alembic<0.9.0,>=0.8.2->panoramix)
Downloading python-editor-0.5.tar.gz
Collecting enum34 (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading enum34-1.1.2.tar.gz (46kB)
100% |################################| 51kB 3.2MB/s
Collecting ipaddress (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting pyasn1>=0.1.8 (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=1.0 in c:\python27\lib\site-packages (from cryptography<2.0.0,>=1.1.1->panoramix)
Collecting six>=1.4.1 (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting idna>=2.0 (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading idna-2.0-py2.py3-none-any.whl (61kB)
100% |################################| 61kB 3.2MB/s
Collecting cffi>=1.4.1 (from cryptography<2.0.0,>=1.1.1->panoramix)
Downloading cffi-1.5.2-cp27-none-win32.whl (141kB)
100% |################################| 143kB 1.2MB/s
Collecting colorama>=0.3 (from flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting click>=3.0 (from flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading click-6.3-py2.py3-none-any.whl (70kB)
100% |################################| 71kB 1.6MB/s
Collecting Flask-BabelPkg>=0.9.4 (from flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading Flask-BabelPkg-0.9.6.tar.gz
Collecting Flask-OpenID>=1.1.0 (from flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading Flask-OpenID-1.2.5.tar.gz (43kB)
100% |################################| 51kB 1.8MB/s
Collecting Flask-WTF>=0.9.1 (from flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading Flask_WTF-0.12-py2-none-any.whl
Collecting Jinja2>=2.4 (from flask<1.0.0,>=0.10.1->panoramix)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |################################| 266kB 293kB/s
Collecting itsdangerous>=0.21 (from flask<1.0.0,>=0.10.1->panoramix)
Downloading itsdangerous-0.24.tar.gz (46kB)
100% |################################| 51kB 1.4MB/s
Collecting pytz>=2011k (from pandas<0.17,==0.16.2->panoramix)
Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
100% |################################| 481kB 975kB/s
Collecting MarkupSafe>=0.9.2 (from Mako->alembic<0.9.0,>=0.8.2->panoramix)
Downloading MarkupSafe-0.23.tar.gz
Collecting pycparser (from cffi>=1.4.1->cryptography<2.0.0,>=1.1.1->panoramix)
Downloading pycparser-2.14.tar.gz (223kB)
100% |################################| 225kB 1.3MB/s
Collecting Babel>=1.0 (from Flask-BabelPkg>=0.9.4->flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading Babel-2.2.0-py2.py3-none-any.whl (6.5MB)
100% |################################| 6.5MB 139kB/s
Collecting speaklater>=1.2 (from Flask-BabelPkg>=0.9.4->flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading speaklater-1.3.tar.gz
Collecting python-openid>=2.0 (from Flask-OpenID>=1.1.0->flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading python-openid-2.2.5.tar.gz (301kB)
100% |################################| 307kB 1.3MB/s
Collecting WTForms (from Flask-WTF>=0.9.1->flask-appbuilder<2.0.0,>=1.4.5->panoramix)
Downloading WTForms-2.1.zip (553kB)
100% |################################| 563kB 966kB/s
Installing collected packages: sqlalchemy, MarkupSafe, Mako, python-editor, alembic, enum34, ipaddress, pyasn1, six, idna, pycparser, cffi, cryptography, colorama, click, werkzeug, Jinja2, itsdangerous, flask, pytz, Babel, speaklater, Flask-BabelPkg, flask-login, python-openid, Flask-OpenID, flask-sqlalchemy, WTForms, Flask-WTF, flask-appbuilder, flask-script, flask-migrate, flask-testing, gunicorn, markdown, numpy, python-dateutil, pandas, parsedatetime, pydruid, requests, sqlalchemy-utils, sqlparse, panoramix
Running setup.py install for sqlalchemy ... done
Running setup.py install for MarkupSafe ... done
Running setup.py install for Mako ... done
Running setup.py install for python-editor ... done
Running setup.py install for alembic ... done
Running setup.py install for enum34 ... done
Running setup.py install for pycparser ... done
Running setup.py install for itsdangerous ... done
Running setup.py install for flask ... done
Running setup.py install for speaklater ... done
Running setup.py install for Flask-BabelPkg ... done
Running setup.py install for flask-login ... done
Running setup.py install for python-openid ... done
Running setup.py install for Flask-OpenID ... done
Running setup.py install for flask-sqlalchemy ... done
Running setup.py install for WTForms ... done
Running setup.py install for flask-appbuilder ... done
Running setup.py install for flask-script ... done
Running setup.py install for flask-migrate ... done
Running setup.py install for flask-testing ... done
Running setup.py install for markdown ... done
Running setup.py install for pydruid ... done
Running setup.py install for sqlalchemy-utils ... done
Running setup.py install for sqlparse ... done
Running setup.py install for panoramix ... done
Successfully installed Babel-2.2.0 Flask-BabelPkg-0.9.6 Flask-OpenID-1.2.5 Flask-WTF-0.12 Jinja2-2.8 Mako-1.0.3 MarkupSafe-0.23 WTForms-2.1 alembic-0.8.5 cffi-1.5.2 click-6.3 colorama-0.3.7 cryptography-1.2.3 enum34-1.1.2 flask-0.10.1 flask-appbuilder-1.6.0 flask-login-0.2.11 flask-migrate-1.8.0 flask-script-2.0.5 flask-sqlalchemy-2.0 flask-testing-0.4.2 gunicorn-19.4.5 idna-2.0 ipaddress-1.0.16 itsdangerous-0.24 markdown-2.6.5 numpy-1.10.4 pandas-0.16.2 panoramix-0.7.0 parsedatetime-1.5 pyasn1-0.1.9 pycparser-2.14 pydruid-0.2.3 python-dateutil-2.5.0 python-editor-0.5 python-openid-2.2.5 pytz-2015.7 requests-2.9.1 six-1.10.0 speaklater-1.3 sqlalchemy-1.0.12 sqlalchemy-utils-0.31.6 sqlparse-0.1.19 werkzeug-0.11.2

c:\Python27\Scripts>fabmanager create-admin --app panoramix
Username [admin]: abcd
User first name [admin]: abcd
User last name [user]: abcd
Email [admin@fab.org]: abcd@abc.com
Password:
Repeat for confirmation:
2016-03-10 11:18:47,601:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (sqlite3.OperationalError) unable to open database file

@mistercrunch
Copy link
Member

Looks like you are installing on windows. I have no way to test against or support windows...

@pankajshrestha
Copy link
Author

Thanks, will see if i can figure this out. What platform do you recommend installing for POC?

@gbrian
Copy link
Contributor

gbrian commented Mar 10, 2016

HI,

I'm managing with Ubuntu and Windows.
To make it work on windows you'll need to tricks:

  • I'm sure about having to change the data path for the sqllite database, but can not find where I did it, sorry. BTW be sure to have an existing "tmp" folder at C:\
  • Delete "panoramix\panoramix\static\assets" file and create a symlink to *"..\assest" * instead
    mklink /D assests ..\assests

I'm using Anaconda as well instead normal python distribution. https://www.continuum.io/downloads

Hope this @helps

@mistercrunch
Copy link
Member

Ubuntu should work great. I'm not planning on ever working on windows support. If someone was to take that on I can review the PRs and just make sure it doesn't break the rest.

@pankajshrestha
Copy link
Author

Thanks

@thanos
Copy link

thanos commented Mar 11, 2016

Under windows you will need to create a panoramix_config.py in your PYTHONPATH.

@sid88in
Copy link
Contributor

sid88in commented Mar 30, 2016

or you can create panoramix_config.py in the same location as config.py and when you run the server config should compile panoramix_config.py

P.S: its changed to caravel_config now ;)

@amrithyerramilli
Copy link

Hi, I am also getting the same error on my Windows machine.
Any updates on this?

@ghost
Copy link

ghost commented Apr 1, 2016

Found solution. Error happends because flask_manager could not find default db path for sqlite db. To fix this your need to change SQLALCHEMY_DATABASE_URI in caravel config.py

  1. Go to your anaconda / python directory.
  2. Open %python_path%\Lib\site-packages\caravel\config.py with text editor
  3. Find row with SQLALCHEMY_DATABASE_URI connection string and change it according to your operation system / database setup. For windows you should type something like
    'sqlite:///C:\\tmp\\caravel.db'

More examples on connection strings at sql alchemy docs pages:
http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html#database-urls

@amrithyerramilli
Copy link

Thanks a ton! Works like charm :)

@sweinbach
Copy link

Hi, a note on Windows 10. I did not have to edit / create config files. Creating the now missing C:\Temp worked for me though...

@Mowjo
Copy link

Mowjo commented Apr 4, 2016

Same for me ! Works perfectly now

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
…pache#173)

Updates the requirements on [@vx/legend](https://github.com/hshoff/vx) to permit the latest version.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.189...v0.0.190)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
…pache#173)

Updates the requirements on [@vx/legend](https://github.com/hshoff/vx) to permit the latest version.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.189...v0.0.190)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
…pache#173)

Updates the requirements on [@vx/legend](https://github.com/hshoff/vx) to permit the latest version.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.189...v0.0.190)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
…pache#173)

Updates the requirements on [@vx/legend](https://github.com/hshoff/vx) to permit the latest version.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.189...v0.0.190)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
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

8 participants