ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
201 stars 37 forks source link

Rolling back session due to database error (sqlite3.OperationalError) no such table: cds_alembic_version #105

Closed aysunakarsu closed 2 years ago

aysunakarsu commented 2 years ago

http://XX.XXX.XXX.XX/hub/dashboards page is not working

I am deploying jupyterhub on K8 For test purrposes in my config.yaml I have db: type: sqlite-memory

      http://XX.XXX.XXX.XX//hub/home page is available with Dashboards tab . 
     However http://XX.XXX.XXX.XX/hub/dashboards page is not working

In Hubs pod's logs there is sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: cds_alembic_version [SQL: SELECT version_num FROM cds_alembic_version] (Background on this error at: http://sqlalche.me/e/14/e3q8)

[W 2022-05-29 16:01:42.352 JupyterHub base:1256] Rolling back session due to database error (sqlite3.OperationalError) no such table: cds_alembic_version

To Reproduce [W 2022-05-29 16:01:42.352 JupyterHub base:1256] Rolling back session due to database error (sqlite3.OperationalError) no such table: cds_alembic_version [SQL: SELECT version_num FROM cds_alembic_version] (Background on this error at: http://sqlalche.me/e/14/e3q8) [E 2022-05-29 16:01:42.361 JupyterHub web:1219] Uncaught exception in write_error Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1217, in send_error self.write_error(status_code, **kwargs) File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py", line 1293, in write_error self.write(html) File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 841, in write raise TypeError(message) TypeError: write() only accepts bytes, unicode, and dict objects

Screenshots

Configuration Zero to JupyterHub config.yaml: hub: db: type: sqlite-memory config: Authenticator: admin_users:

singleuser: image: name: ideonate/containds-allr-datascience tag: 0.6.2

Thanks

aysunakarsu commented 2 years ago

I suppose the problem was due to database type in my config.yaml. I had sqlite-memory as database type. Changed to sqlite-pvc corrected the problem.

danlester commented 2 years ago

Thank you for letting everyone know!

It's not something I've seen before.