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

Loading from dsn file is not working #219

Open
sivankumar86 opened this issue Dec 10, 2022 · 1 comment
Open

Loading from dsn file is not working #219

sivankumar86 opened this issue Dec 10, 2022 · 1 comment

Comments

@sivankumar86
Copy link

Steps to reproduce the issue.

  1. Create dsn file
  2. Run below commands
    %config SqlMagic.dsn_filename='./dsn.ini'
    %sql –section [DB_CONFIG_1]

I get below error instead of connecting to db

"Environment variable $DATABASE_URL not set, and no connect string given."

@idomic
Copy link

idomic commented Dec 22, 2022

@sivankumar86 check out this section here
Your syntax is off, use %sql --section DB_CONFIG_1. Also make sure you have psycopg2 installed and there are no spaces in the .ini file.
Just tested via Jupysql and a local postgres and it works!

pmfischer pushed a commit to pmfischer/ipython-sql that referenced this issue Sep 8, 2023
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

2 participants