Issue with rembg

same thing with rembg:

here my code

(Line 0-20):

 import discord  #import the main libary
from discord import Intents
from discord.ext import commands
from discord import app_commands
import json
import os
from discord.app_commands import Choice
import ffmpeg
from urllib.request import urlopen
from random import randint, choice
import logging
import datetime
import aiohttp
import numpy
from Restaurant import Restaurant
import youtube_dl
from discord.utils import get
import asyncio
from rembg import remove
import Lists

Line 918-942:

@tree.command(
 name='ship',
 description=
 'dont you dare use this abomination of a command or i will personally hunt you down'
)
@app_commands.describe(user1='first user (please stop)',
                       user2='second user (STOP NOW)')
async def ship(interaction: discord.Interaction, user1: discord.Member,
               user2: discord.Member):
 await interaction.response.defer()                
 with open('shiptxt.txt','r') as f:
  shipping = f.read()
 #unfinshed
 people = sorted([str(user1.name),str(user2.name)])   
 name_of_ship = await swapTwoHalves(people[0],people[1]) 
 shipping = shipping.split('\n')
 rating = 'placeholder'
 for item in shipping:
   if (name_of_ship+',') in item:
     rating = str(item.split(',')[1])
 if rating == 'placeholder':
   rating = randint(0,100)
   with open('shiptxt.txt','a') as f:
     f.write(f'{name_of_ship},{rating}\n')
 await user1.avatar.save(f'{user1.name}.png') 
 await user2.avatar.save(f'{user2.name}.png')
 avatar1 = Image.open(f"{user1.name}.png")   
 avatar2 = Image.open(f"{user2.name}.png")   
 if int(rating) > 65: emoji = Image.open('heart_emoji.png')                
 else: emoji = Image.open('x.png')    
 emoji = remove(emoji)  
 avatar1 = avatar1.resize((240, 240))       
 avatar1_size = avatar1.size
 avatar2_size = avatar2.size
 emoji = emoji.resize((210,210))
 emoji_size = emoji.size
 merged = Image.new('RGB',(3*avatar1_size[0]-60, avatar1_size[1]), (250,250,250))  
 merged.paste(avatar1,(0,0))
 merged.paste(emoji,(avatar1_size[0] - 30,0))    
 try: merged.paste(emoji,(avatar1_size[0]-60+emoji_size[0]),0)       
 except: pass
 merged.save(f'ship_{name_of_ship}.png') 
                 
 
 await interaction.followup.send(f'{name_of_ship},{rating}')


Hi @MikeblackBelt1 I moved the post because your code doesn’t relate to OpenCV.

Can you post a link to your Repl so that others in the community can offer some ideas?