Почему возникает данная ошибка?
import discord
import random
import os
import os.path
from PIL import Image, ImageDraw
client = discord.Client()
a = list(filter(lambda x: x.endswith('.png'), os.listdir("D:\мемы")))
im = Image.open(random.choice(a))
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
# if message.content.startswith('$еблан'):
# await message.channel.send('сам еблан!')
if message.content.startswith('$мем'):
await message.channel.send('Вау!Ты хочешь поугарать с несмешных мемчиков?Ну ладно!')
await message.channel.send(im)
client.run('Njg4NzEyNzgxODg4NzQ5NjE0.Xm4VUw.qe7_MCc4KeE4N--LBgvGY9tRiFw')
текст ошибки:
Traceback (most recent call last):
File "stonks.py", line 9, in <module>
im = Image.open(random.choice(a))
File "D:\python3\lib\site-packages\PIL\Image.py", line 2809, in ope
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'stonks.png'