Skip to content

Problems encountered when I try to run the demo of this project #4

@youmu1

Description

@youmu1

I try to run the use case of this project, this is my code:
`
import os
from sqlalchemy import create_engine

os.environ['CLASSPATH'] = "./postgresql-42.2.18.jar"

def connect(user, password, db, ip='127.0.0.1:5432'):
url = 'jdbcapi+pgjdbc://{}:{}@{}/{}'
url = url.format(user, password, ip, db)
con = create_engine(url)
return con

if name == 'main':
conn = connect('postgres', '123456', 'test')
execute = conn.execute("select * from admin")
print(execute)
`
And the following is the error I encountered:
image
image

What's wrong with this?

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