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

Does not seem to use .pgpass file #651

Closed
jestover opened this issue Jun 19, 2024 · 2 comments
Closed

Does not seem to use .pgpass file #651

jestover opened this issue Jun 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jestover
Copy link

What language are you using?

Python

What version are you using?

Python 3.12.3
connectorx 0.3.3

What database are you using?

PostgreSQL

What dataframe are you using?

Polars

Can you describe your bug?

If I don't include a password that is in my .pgpass file it gives a password missing error

What are the steps to reproduce the behavior?

# Works
import polars as pl
uri = "postgres://username:password@url:port/db_name?sslmode=require"
query = "SELECT * FROM table"
pl.read_database_uri(query=query, uri=uri)

# Doesn't work
import polars as pl
uri = "postgres://username@url:port/db_name?sslmode=require"
query = "SELECT * FROM table"
pl.read_database_uri(query=query, uri=uri)
 # Gives repeated errors like
[2024-06-19T20:06:47Z ERROR r2d2] invalid configuration: password missing

# I can connect using the second uri using sql though, because the .pgpass file contains
# the password.  Not sure if this is a bug or if support for the .pgpass is just not
# implemented
@jestover jestover added the bug Something isn't working label Jun 19, 2024
@surister
Copy link
Contributor

Duplicated of #567

@wangxiaoying
Copy link
Contributor

As @surister mention above, please redirect to #567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants