반응형

Error 4

[에러노트/파이썬] AttributeError: 'Image' object has no attribute 'shape'

AttributeError: 'Image' object has no attribute 'shape'에러노트: 제가 직접 겪었던 에러와 해결 방법에 대해 소개합니다.에러파이썬에서 아래와 같이 laod_img를 통하여 이미지를 불러오고, 이미지의 크기를 조회하기 위해 shape를 사용했는데, 다음과 같은 에러가 발생했다.AttributeError: 'Image' object has no attribute 'shape'from keras_preprocessing.image import load_imgfilename = 'output_20240301_V0000.png'sample_img = load_img(filename)sample_img.shape해결확인한 결과, shape이라는 속성이 없다는 경고문이었다...

Error 2025.04.18

[에러노트/파이썬] TypeError: cannot subtract DatetimeArray from ndarray

TypeError: cannot subtract DatetimeArray from ndarray에러노트: 제가 직접 겪었던 에러와 해결 방법에 대해 소개합니다.에러파이썬에서 날짜/시간 데이터의 차이를 계산하려고 하는데, 다음과 같은 에러가 발생했다. TypeError: cannot subtract DatetimeArray from ndarraydf['date_time_sub'] = (df['date_time_now'] - df['date_time_rev']).astype('timedelta64[s]')해결info로 데이터 타입을 확인한 결과 date_time_rev 컬럼은 datetime 타입이고, date_time_now는 object 타입이었다.df.info()날짜 차이를 계산하려는 date_time..

Error 2025.04.16

[에러노트/파이썬] AttributeError: 'NoneType' object has no attribute 'append'

AttributeError: 'NoneType' object has no attribute 'append'에러노트: 제가 직접 겪었던 에러와 해결 방법에 대해 소개합니다.에러리스트에 요소를 추가하기 위해 append를 사용했는데, 다음과 같은 에러가 발생했다. 아래 코드는 실제 데이터가 아닌 sample이라는 리스트를 임의로 생성하여 작성하였다. 1부터 10까지의 숫자가 들어있는 리스트에 11과 12를 추가하여 sample 변수에 할당했더니 에러가 발생했다.AttributeError: 'NoneType' object has no attribute 'append'sample = [1,2,3,4,5,6,7,8,9,10]sample = sample.append(11)sample = sample.append(1..

Error 2025.03.26

[에러노트/파이썬] JVMNotFoundException: No JVM shared library file (jvm.dll) found.

JVMNotFoundException: No JVM shared library file (jvm.dll) found.에러노트: 제가 직접 겪었던 에러와 해결 방법에 대해 소개합니다. 에러 다음과 같이 Okt 형태소 분석기를 사용하려고 했는데 JAVA 관련 에러가 나타났다.from konlpy.tag import Oktokt = Okt()다음과 같은 에러가 발생했다. JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly. 해결 해결 방법은 최신 JDK 파일을 설치하고, 환경 변수를 설정하면 된다. 해결 과정은 아래와 같다.1. 최신 JDK..

Error 2024.10.24
반응형