Skip to content

asyncpg.exceptions.InvalidAuthorizationSpecificationError False Error #616

@DevBefell

Description

@DevBefell
  • asyncpg version:
    0.21.0
  • PostgreSQL version:
    12.4
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    :
    No
  • Python version:
    3.7.9
  • Platform:
    Windows
  • Do you use pgbouncer?:
    No
  • Did you install asyncpg with pip?:
    Yes
  • If you built asyncpg locally, which version of Cython did you use?:
  • Can the issue be reproduced under both asyncio and
    uvloop?
    :
    I used asyncio cannot use uvloop as it is not compatible with Windows

I am using Heroku's addon for Postgressql and I used to use psycopg2, but wanted to switch to asyncpg, I get asyncpg.exceptions.InvalidAuthorizationSpecificationError: no pg_hba.conf entry for host "", user "",database "", SSL off for invalid inputs, but with psycopg2 it works perfectly fine.
Is there something I am doing wrong? The dsn link is correct but it still gives the error
Heres the code I used to test:

import asyncpg
import asyncio
# import psycopg2

async def main():
    db_url = ""
    db: asyncpg.pool.Pool = await asyncpg.create_pool(db_url)
    print(await db.fetch(f"SELECT * from testing"))


asyncio.get_event_loop().run_until_complete(main())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions