Python 8

[Error] ValueError: TypeError("'coroutine' object is not iterable"), TypeError('vars() argument must have dict attribute')

https://velog.io/@nam-willow/Error-ValueError-TypeErrorcoroutine-object-is-not-iterable-TypeErrorvars-argument-must-have-dict-attribute [Error] ValueError: TypeError("'coroutine' object is not iterable"), TypeError('vars() argument must have dict attribute')참고 사이트Adding async to Fastapi function gives me the "'coroutine' object is not iterable" errorcoroutine함수명 함수를 실행을 했더니 오류가 발생했다. coroutine함수..

Error 2024.12.22

[Error] binascii.Error: Invalid base64-encoded string

오류decode_base64_to_image() 메서드만 실행하면 계속 오류가 뜬다■ decode_base64_to_image() | 동작시작 *** Error running process: /경로/경로/extensions/sd-webui-controlnet/scripts/controlnet.py Traceback (most recent call last): File "/경로/경로/modules/api/api.py", line 466, in decode_base64_to_image image = Image.open(BytesIO(base64.b64decode(encoding))) File "/usr/lib/python3.10/base64.py", line 87, in ..

Error 2024.12.21

[Python] hsv를 사용해서 색상 변경하기

이전에 작성했던 코드에서 치명적 오류명도가 조금만 밝으면 아예 이미지가 깨지는 현상 발생... 이를 해결하려고 명도를 확인해서 수정하는 코드 작성명도가 205이하면 어둡다고 생각해서 +50 하고, 205 이상이면 +50 했을때 이미지가 깨지는 경우가 발생해서 numpy를 사용해서 처리해줫음def color(self, request_param: models.Color, 일부 생략): rgb_color = self.parse_color(request_param.rgb,request_param.hex, request_param.hsl) # 변경할 색상 값 newColor = {'R': rgb_color[0], 'G': rgb_color[1], 'B': rgb_color[2..