반응형
나는 이것이 매우 기본적인 질문이라고 생각하지만 이유를 알 수 없습니다.
import psycopg2
psycopg2.connect("postgresql://postgres:postgres@localhost/postgres")
다음과 같은 오류가 발생합니다.
psycopg2.OperationalError: missing "=" after
"postgresql://postgres:postgres@localhost/postgres" in connection info string
psycopg2.connect("host=localhost user=postgres password=postgres dbname=postgres")
Ubuntu12.04의 Python2.7.3에서 최신 psycopg2 버전을 사용하고 있습니다.
해결 방법
참조 페이지 https://stackoverflow.com/questions/15634092
반응형
'파이썬' 카테고리의 다른 글
파이썬 Can Python print a function definition? (0) | 2021.01.23 |
---|---|
파이썬 Python에서 타이머 틱 가져 오기 (0) | 2021.01.23 |
파이썬 장고 모델 객체 필터 (0) | 2021.01.23 |
파이썬 sqlalchemy.exc.ArgumentError : 플러그인을로드 할 수 없음 : sqlalchemy.dialects : driver (0) | 2021.01.23 |
파이썬 Python 3.x : 다음 줄로 이동 (0) | 2021.01.22 |
댓글