Skip to content

In Colab: Connecting fails: "got an unexpected keyword argument 'bind'" #227

Open

Description

@jsmorph

Connecting like

%sql mysql+pymysql://{user}:{password}@{host}/shared

now produces:

__init__() got an unexpected keyword argument 'bind'
Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])

This error started happening in the last 24 hours.

Ideas?

Activity

  1. kpgaffney commented on Feb 3, 2023

    @kpgaffney

    I'm not sure what's causing this, but it looks like it's related to SQLAlchemy version 2.0.0. As a temporary workaround, I added !pip install SQLAlchemy==1.4.46 before %load_ext sql, which fixed the problem.

  2. jsmorph commented on Feb 3, 2023

    @jsmorph
    Author

    Thanks very much for the quick fix.

    FWIW, I'm now pinning versions like this in Colab:

    !pip install SQLAlchemy==1.4.46
    !pip install PyMySQL==1.0.2 # or whichever
    !pip install ipython-sql==0.4.1
    
  3. rwarren commented on Feb 14, 2023

    @rwarren

    Same problem here, but when I install SQLAlchemy 1.4.46 it does not help. In my case I'm running a local jupyterlab (version 3.6.1).

    image

  4. tjerkw commented on Feb 16, 2023

    @tjerkw

    Same issue, pinning sqlAclhemny or ipython-sql does not work.

  5. jsmorph commented on Feb 16, 2023

    @jsmorph
    Author

    @tjerkw and @rwarren, did you restart the runtime after the pinned pip installs? When I do these installs and then restart the runtime, things work. (Menu: Runtime -> Restart runtime.)

  6. rwarren commented on Feb 16, 2023

    @rwarren

    @jsmorph I thought I had restarted, but apparently not! After a fresh reboot today, this is is working perfectly fine after installing SQLAlchemy==1.4.46. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions