Skip to content

Commit cb46ac7

Browse files
committed
Change 'psycopg' to 'pg8000' driver.
Moved by 'plantuml.jar'.
1 parent c69cf6f commit cb46ac7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

postgres_handler.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import psycopg2
2-
from psycopg2 import Error
1+
import pg8000
2+
from pg8000 import Error
33
from typing import Dict
44
from eralchemy import render_er
55
import os
@@ -13,8 +13,8 @@ class PostgreSQL_handler():
1313
"""
1414
def __init__(self, host, port, user, password, db_name, schema_name):
1515
try:
16-
self.conn = self.connection = psycopg2.connect(
17-
dbname=db_name, user=user, password=password, host=host, port=port
16+
self.conn = self.connection = pg8000.connect(
17+
database=db_name, user=user, password=password, host=host, port=port
1818
)
1919
except Error as e:
2020
print(f"{e}")
File renamed without changes.

0 commit comments

Comments
 (0)