PYTHON/Error Data
-
오류 코드 typeerror: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' 해결 방법 # 기존 코드 def create_chart(self, dataframe): fig = plt.figure(figsize=(12, 8)) ax = fig.add_subplot(111) mpl_finance.candlestick2_ohlc( ~~~~~ ) # 변경 코드 def create_chart(self, dataframe): data = dataframe.astype(float) fi..
MySQL 오류 : typeerror: ufunc 'isfinite' not supported for the input types오류 코드 typeerror: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' 해결 방법 # 기존 코드 def create_chart(self, dataframe): fig = plt.figure(figsize=(12, 8)) ax = fig.add_subplot(111) mpl_finance.candlestick2_ohlc( ~~~~~ ) # 변경 코드 def create_chart(self, dataframe): data = dataframe.astype(float) fi..
2021.04.07 -
오류 코드 명 mysql.connector.errors.InternalError: Unread result found 해결 방법 # 기존 코드 connection = mysql.connector.connect(user="", password="", host="") cur = connection.cursor() # 변경 코드 connection = mysql.connector.connect(user="", password="", host="") cur = connection.cursor(buffered=True) 즉, cursor() 안에 buffered=True만 넣어주면 이 오류는 해결된다. 부연 설명 본인의 경우 이 오류는 데이터를 입력하고자 할 때, 즉 cur.execute("INSERT ~~")와..
MySQL 오류 : InternalError: Unread result found오류 코드 명 mysql.connector.errors.InternalError: Unread result found 해결 방법 # 기존 코드 connection = mysql.connector.connect(user="", password="", host="") cur = connection.cursor() # 변경 코드 connection = mysql.connector.connect(user="", password="", host="") cur = connection.cursor(buffered=True) 즉, cursor() 안에 buffered=True만 넣어주면 이 오류는 해결된다. 부연 설명 본인의 경우 이 오류는 데이터를 입력하고자 할 때, 즉 cur.execute("INSERT ~~")와..
2021.04.04 -
[오류 코드 명] Truncated incorrect DOUBLE value: "~~~~~" Unknown '~~~~~~~' column in 'where clause' 위의 두 오류는 해석한 의미대로 해결하면 절대 해결되지 않는 문제점이다. 며칠 간 괴롭히던 문제점 중 하나인데, 정말 손쉽고 정말 당연하게 해결했다. 바로 python 내 코드에서의 입력값과 데이터베이스 내 칼럼의 자료형이 일치하지 않는 경우이다. 예를 들어 DB의 칼럼 자료형을 VARCHAR로 설정했다면 python 내 코드에서는 입력할 데이터의 양 옆에 ' ' 표시를 통해 문자열임을 나타내야 한다. 그렇지 않고 'code'=000020의 형태로 넣게 된다면 위의 오류가 발생하고, 'code'='000020'의 형태로 INSERT IN..
MySQL 오류 : MySQL Database Error: Truncated incorrect DOUBLE value / Unknown column in 'where clause'[오류 코드 명] Truncated incorrect DOUBLE value: "~~~~~" Unknown '~~~~~~~' column in 'where clause' 위의 두 오류는 해석한 의미대로 해결하면 절대 해결되지 않는 문제점이다. 며칠 간 괴롭히던 문제점 중 하나인데, 정말 손쉽고 정말 당연하게 해결했다. 바로 python 내 코드에서의 입력값과 데이터베이스 내 칼럼의 자료형이 일치하지 않는 경우이다. 예를 들어 DB의 칼럼 자료형을 VARCHAR로 설정했다면 python 내 코드에서는 입력할 데이터의 양 옆에 ' ' 표시를 통해 문자열임을 나타내야 한다. 그렇지 않고 'code'=000020의 형태로 넣게 된다면 위의 오류가 발생하고, 'code'='000020'의 형태로 INSERT IN..
2021.02.07 -
간혹 파이썬을 통해 MySQL의 Query문을 이용하여 데이터를 저장하다 보면 오류가 발생하곤 한다. [오류 코드] MySQL Could not connect, server may not be running. [해결 방법] 작업 표시줄 실행(Ctrl + Shift + Esc) - 서비스 클릭 MySQL 검색 오른쪽 클릭 후 시작 클릭 해결!
MySQL WorkBench 오류 : MySQL Could not connect, server may not be running.간혹 파이썬을 통해 MySQL의 Query문을 이용하여 데이터를 저장하다 보면 오류가 발생하곤 한다. [오류 코드] MySQL Could not connect, server may not be running. [해결 방법] 작업 표시줄 실행(Ctrl + Shift + Esc) - 서비스 클릭 MySQL 검색 오른쪽 클릭 후 시작 클릭 해결!
2021.02.05