Why is my image\_upload\_url not updating the GraphQl mutation with an image? def processPerformerImage(self, app, image\_path, performer\_id, mode, scale, tag):
 global tag\_ids
 global app\_keys
 tag\_ids = []

 # Set current directory
 current\_dir = Path().resolve()

 # Get Enum Settings
 # if first\_half\_mode is not None:
 # scale = Scale.\_\_getattr\_\_(second\_half\_scale)
 # else:
 # self.error("No scale setting found")
 # if first\_half\_mode is not None:
 # mode = Mode.\_\_getattr\_\_(second\_half\_mode)
 # else:
 # self.error("No mode setting found")

 try:
 r = requests.get(image\_path, stream=True, headers=self.headers)
 r.raise\_for\_status()
 r.raw.decode\_content = True
 img = Image.open(BytesIO(r.content))
 file\_format = img.format.lower()
 if file\_format not in IMAGE\_TYPES:
 self.error(
 "file\_format not in IMAGE\_TYPES: converting to JPEG")
 img = img.convert('RGB')
 # Variable for saved image
 file\_format = 'jpeg'
 image\_name = "image\_to\_process." + file\_format
 self.error("file\_format\_new\_saved: "+file\_format)

 # Check if image already exists
 image\_saved = current\_dir / image\_name
 if os.path.exists(image\_saved):
 self.delete\_file\_with\_permissions\_check(image\_saved)

 img.save(image\_name, format='JPEG', quality=90)
 except requests.exceptions.RequestException as e:
 self.error(
 "An error occurred while trying to download the image:{}".format(e))
 return
 except Exception as e:
 self.error(
 "An error occurred while trying to convert the image:{}".format(e))
 return

 # Variable for saved image
 self.error("file\_format: "+file\_format)

 image\_name = "image\_to\_process." + file\_format
 image\_saved = current\_dir / image\_name

 self.error("image\_saved: "+str(image\_saved))

 # Check if original image already exists in root & delete
 if os.path.exists(image\_saved):
 # os.remove(image\_saved)
 self.delete\_file\_with\_permissions\_check(image\_saved)

 # Check if processed image already exists in root & delete
 split\_image = image\_name.split(".")
 image\_name = split\_image[0]
 file\_ext = split\_image[1]
 image\_pro = image\_name + OUTPUT\_SUFFIX + "." + file\_ext
 image\_pro\_resolve = os.path.join(current\_dir, image\_pro)
 if os.path.exists(image\_pro\_resolve):
 # os.remove(image\_pro\_resolve)
 self.delete\_file\_with\_permissions\_check(image\_pro\_resolve)

 # Check if processed image already exists in mapped folder & delete
 custom\_mapped\_folder\_resolve = os.path.join(
 CUSTOM\_MAPPED\_FOLDER, image\_pro)
 if os.path.exists(custom\_mapped\_folder\_resolve):
 # os.remove(custom\_mapped\_folder\_resolve)
 self.delete\_file\_with\_permissions\_check(
 custom\_mapped\_folder\_resolve)

 # Save image
 with open(image\_saved, 'wb') as f:
 img.save(f, "JPEG", quality=95, optimize=True)

 self.error("image\_saved: "+str(image\_saved))

 # Process the image
 output\_path = app.process(image\_saved, scale=scale, mode=mode)

 # clear the image
 app.send\_keys\_clear()
 # move the processed image to custom mapped folder
 image\_moved = shutil.move(output\_path, CUSTOM\_MAPPED\_FOLDER)
 self.error("image\_moved: "+str(image\_moved))

 # Upload URL of image
 image\_upload\_url = CUSTOM\_MAPPED\_URL + "/" + image\_pro
 self.error("image\_upload\_url: "+str(image\_upload\_url))

 # with open(image\_upload\_url, "rb") as image\_file:
 # encoded\_string = base64.b64encode(
 # image\_file.read()).decode("utf-8")
 # data\_url = f"data:image/jpeg;base64,{encoded\_string}"

 # Update performer with new image
 query = """
 mutation performerUpdate($performer\_update\_input: PerformerUpdateInput!){
 performerUpdate(input: $performer\_update\_input){
 id
 image\_path
 }
 }
 """
 variables = {"performer\_update\_input": {
 "id": performer\_id, "image": image\_upload\_url}}
 result = self.\_\_callGraphQL(query, variables)

 # Update Performer Tags
 tags = self.findPerformersTagsbyID(performer\_id)
 tag\_to\_remove = "Upscale " + tag
 self.error("tag\_to\_remove: "+tag\_to\_remove)
 for tag in tags:
 if tag\_to\_remove not in tag:
 tag\_ids.append(self.findTagIdWithName(tag))
 self.error("tag\_ids: "+str(tag\_ids))
 else:
 pass # The else block does nothing

 upscaled\_name = "Upscaled: Performer Image"
 upscaled = self.findTagIdWithName(upscaled\_name)
 tag\_ids.append(upscaled)
 # remove the marker value
 self.error("tag\_ids + upscaled: "+str(tag\_ids))
 self.updatePerformerIDTagsWithID(performer\_id, tag\_ids)

 # Delete the processed image
 custom\_mapped\_folder\_resolve = os.path.join(
 CUSTOM\_MAPPED\_FOLDER, image\_pro)
 # if os.path.exists(custom\_mapped\_folder\_resolve):
 # os.remove(custom\_mapped\_folder\_resolve)
 # self.delete\_file\_with\_permissions\_check(custom\_mapped\_folder\_resolve)

 # Delete the original image
 # if os.path.exists(image\_saved):
 # self.delete\_file\_with\_permissions\_check(image\_saved)
hy 내 image\_upload\_url이 이미지로 GraphQl 변형을 업데이트하지 않나요? def processPerformerImage(self, app, image\_path, performer\_id, mode, scale, tag):W
 글로벌 태그\_ids
 글로벌 앱\_키
 tag\_ids = []

 # 현재 디렉토리 설정
 current\_dir = Path().resolve()

 # 열거형 설정 가져오기
 # 첫 번째\_하프\_mode가 None이 아닌 경우:
 # scale = Scale.\_\_getattr\_\_(second\_half\_scale)
 # else:
 # self.error("스케일 설정이 없습니다")
 # 첫 번째\_하프\_모드가 None이 아닌 경우:
 # mode = Mode.\_\_getattr\_\_(second\_half\_mode)
 # else:
 # self.error("모드 설정이 없습니다")

 try:
 r = requests.get(image\_path, stream=True, headers=self.headers)
 r.raise\_for\_status()
 r.raw.decode\_content = True
 img = Image.open(BytesIO(r.content))
 file\_format = img.format.lower()
 파일\_형식이 이미지\_타입에 없으면:
 self.error(
 "파일\_형식이 IMAGE\_TYPES에 없음: JPEG로 변환 중")
 img = img.convert('RGB')
 # 저장된 이미지에 대한 변수
 file\_format = 'jpeg'
 이미지\_이름 = "이미지\_투\_프로세스." + 파일\_형식
 self.error("파일\_형식\_새로운\_saved:"+파일\_형식)

 # 이미지가 이미 존재하는지 확인
 image\_saved = 현재\_dir/이미지\_이름
 if os.path.exists(image\_saved):
 self.delete\_file\_with\_permissions\_check(image\_saved)

 img.save(이미지\_이름, 형식='JPEG', 품질=90)
 요청.예외.요청 예외를 e로 제외합니다:
 self.error(
 "이미지를 다운로드하는 동안 오류가 발생했습니다:{}".format(e))
 반환
 예외를 e로 제외합니다:
 self.error(
 "이미지를 변환하는 동안 오류가 발생했습니다:{}".format(e))
 반환

 # 저장된 이미지에 대한 변수
 self.error("파일\_형식:"+파일\_형식)

 이미지\_이름 = "이미지\_to\_프로세스." + 파일\_형식
 image\_saved = 현재\_dir/이미지\_이름

 self.error("image\_saved: "+str(image\_saved))

 # 원본 이미지가 루트에 이미 존재하는지 확인 후 삭제
 os.path.exists(image\_saved):
 # os.remove(image\_saved)
 self.delete\_file\_with\_permissions\_check(image\_saved)

 # 처리된 이미지가 이미 루트에 있는지 확인하고 삭제합니다.
 split\_image = image\_name.split(".")
 image\_name = split\_image[0]
 file\_ext = split\_image[1]
 image\_pro = image\_name + OUTPUT\_SUFFIX + "." + file\_ext
 image\_pro\_resolve = os.path.join(current\_dir, image\_pro)
 if os.path.exists(image\_pro\_resolve):
 # os.remove(image\_pro\_resolve)
 self.delete\_file\_with\_permissions\_check(image\_pro\_resolve)

 # 처리된 이미지가 매핑된 폴더에 이미 있는지 확인하고 삭제합니다.
 custom\_mapped\_folder\_resolve = os.path.join(
 CUSTOM\_MAPPED\_FOLDER, image\_pro)
 if os.path.exists(custom\_mapped\_folder\_resolve):
 # os.remove(custom\_mapped\_folder\_resolve)
 self.delete\_file\_with\_permissions\_check(
 custom\_mapped\_folder\_resolve)

 # 이미지 저장
 with open(image\_saved, 'wb') as f:
 img.save(f, "JPEG", quality=95, optimize=True)

 self.error("image\_saved: "+str(image\_saved))

 # 이미지 처리
 output\_path = app.process(image\_saved, scale=scale, mode=mode)

 # 이미지 지우기
 app.send\_keys\_clear()
 # 처리된 이미지를 사용자 지정 매핑 폴더로 이동합니다.
 image\_moved = shutil.move(output\_path, CUSTOM\_MAPPED\_FOLDER)
 self.error("image\_moved: "+str(image\_moved))

 # 이미지의 URL 업로드
 image\_upload\_url = CUSTOM\_MAPPED\_URL + "/" + image\_pro
 self.error("image\_upload\_url: "+str(image\_upload\_url))

 # open(image\_upload\_url, "rb")를 image\_file로 사용합니다:
 # encoded\_string = base64.b64encode(
 # 이미지\_파일.읽기()).디코드("utf-8")
 # data\_url = f"data:image/jpeg;base64,{encoded\_string}"

 # 새 이미지로 수행자 업데이트
 query = """
 mutation performerUpdate($performer\_update\_input: PerformerUpdateInput!){
 performerUpdate(입력: $performer\_update\_input){
 id
 이미지\_경로
 }
 }
 """
 변수 = {"수행자\업데이트\_입력": {
 "id": performer\_id, "image": image\_upload\_url}}
 결과 = self.\_\_callGraphQL(쿼리, 변수)

 # 퍼포머 태그 업데이트
 tags = self.findPerformersTagsbyID(performer\_id)
 tag\_to\_remove = "업스케일" + tag
 self.error("tag\_to\_remove:"+tag\_to\_remove)
 태그의 태그에 대해:
 태그에 태그\_to\_remove가 없는 경우:
 tag\_ids.append(self.findTagIdWithName(tag))
 self.error("tag\_ids: "+str(tag\_ids))
 else:
 전달 # else 블록은 아무것도 하지 않습니다.

 upscaled\_name = "업스케일: 출연자 이미지"
 upscaled = self.findTagIdWithName(upscaled\_name)
 tag\_ids.append(upscaled)
 # 마커 값 제거
 self.error("tag\_ids + upscaled: "+str(tag\_ids))
 self.updatePerformerIDTagsWithID(performer\_id, tag\_ids)

 # 처리된 이미지 삭제
 custom\_mapped\_folder\_resolve = os.path.join(
 custom\_mapped\_folder, image\_pro)
 # if os.path.exists(custom\_mapped\_folder\_resolve):
 # os.remove(custom\_mapped\_folder\_resolve)
 # self.delete\_file\_with\_permissions\_check(custom\_mapped\_folder\_resolve)

 # 원본 이미지 삭제
 # if os.path.exists(image\_saved):
 # self.delete\_file\_with\_permissions\_check(image\_saved)