반응형 cx_oracle2 cx_oracle 다중처리 : can't pickle cx_oracle._error objects Python multiprocessing and database access with cx_oracle “is not safe”? 파이썬 멀티프로세싱을 사용할때 오라클 연동을 할 수 없는걸까? 기존 방식대로 multiprocessing 의 pool 을 사용하려 했지만 cx_oracle 과 같이 쓰려면 아래의 에러가 계속 뜬다. can't pickle cx_oracle._error objects 몽고DB와 mysql 은 다중처리할 함수안에다가 연결인자를 넣으면 다중처리가 되는데 cx_oracle은 동일한 방식으로 해결을 못하고 import cx_Oracle import os os.putenv('NLS_LANG', '.UTF8') LOCATION = r"C:/oracle/instantclient_11_2" .. 2020. 12. 10. ORA-01036: illegal variable name/number 잘못된 변수명/번호 | cx_oracle 이용할때 힘들었던 것 정리 import pandas as pd import cx_Oracle import os # Dataframe 불러오기 df = pd.read_csv('sector_2020-10-06 0.csv',usecols=[1,2,3,4,5,6,7]) df = df.fillna('') #NaN 제거 print(df) os.putenv('NLS_LANG', '.UTF8') LOCATION = r"C:/oracle/instantclient_11_2" os.environ["PATH"] = LOCATION+";"+os.environ["PATH"] #연결에 필요한 기본 정보 (유저, 비밀번호, 데이터베이스 서버 주소) db = cx_Oracle.connect('user','PASSWO.. 2020. 10. 6. 이전 1 다음 반응형