You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Docker for MySQL and Jupyter, and am having difficulties using this extension. I can see the SQL icon and run it, but when I enter my username, password, and database hostname, the only thing I see is 'NoneType' object has no attribute 'replace'.
FROM jupyterhub/jupyterhub
RUN pip install --upgrade pip
RUN conda install jupyterlab
RUN jupyter labextension install @jupyterlab/hub-extension
RUN pip install jupyterlab_sql pip mysqlclient
RUN jupyter serverextension enable jupyterlab_sql --py --sys-prefix
RUN jupyter lab build
Thanks for reporting this, and apologies for the late reply.
I can reproduce this when I put no database name in the connection URL. For instance, for a database running locally, if I write:
mysql://
... in the connection URL, I get the same error. However, if I write:
mysql:///employees
... to connect to an employees database, the plugin works as expected.
Other 'supported' database engines behave correctly:
with sqlite, if you just specify sqlite:// as the connection URL, you get an in-memory, nameless database, as expected.
with postgres, if you just specify postgres:// as the connection URL, it attempts to connect to a local database with the same name as the current user. If that database doesn't exist, the error message is, correctly, No database called USERNAME.
I'll therefore 'fix' this by catching connection URLs for MySQL with no database and raising an appropriate error.
Greetings
I'm using Docker for MySQL and Jupyter, and am having difficulties using this extension. I can see the SQL icon and run it, but when I enter my username, password, and database hostname, the only thing I see is
'NoneType' object has no attribute 'replace'
.Here are the relevant parts of my
docker-compose
:Here is an excerpt from my Jupyterlab Dockerfile:
Versions: Jupyterlab 1.1.4, Python 3.6.9, IPython 7.8.0
The text was updated successfully, but these errors were encountered: