본문 바로가기

반응형

python error

(2)
[파이썬 에러] cv2.error: opencv(4.5.2) :-1: error: (-5:bad argument) in function 'circle' > overload resolution failed: > - layout of the output array img is incompatible with cv::mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels) > -.. python에서 좌표 몇개를 cv2 라이브러리를 이용해서 간단히 plotting 하려고 했으나 다음과 같은 에러가 발생했다. cv2.error: opencv(4.5.2) :-1: error: (-5:bad argument) in function 'circle' > overload resolution failed: > - layout of the output array img is incompatible with cv::mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels) > - expected ptr for argument 'img' 나 같은 경우에는 아래의 코드에서 문제가 발생했다. # setting image display = images..
[파이썬 에러] UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. 나는 conda 로 각기 다른 코드를 각기 다른 환경에서 실행한다. 그런데 어떤 깃허브로 받아서 돌리던 코드에서 모델의 중간 feature 를 시각화 하고 싶어서 matplotlib 를 이용하여 plt.show()를 했으나 다음과 같은 에러가 발생했다. UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plt.show() 다른 사이트들을 참고하여 이 문제를 해결하려고 했으나 사이트에서 언급한 바에 따르면 "가상환경 라이브러리의 의존성 문제" 가 원인인듯 했고 이를 해결하기 위해 이 라이브러리를 설치해라.. 이걸 저렇게 바꿔라 등등의 솔루션이 나왔지만 해봐도 문제가 해결되지..

반응형