Traceback (most recent call last):
File "D:\project\Leo\commands\ocnovnoe.py", line 494, in upload_photo
res = await client.post(server, data=files)
File "D:\project\Leo\venv\lib\site-packages\aiohttp\client.py", line 404, in _request
url = URL(str_or_url)
File "D:\project\Leo\venv\lib\site-packages\yarl\_url.py", line 154, in __new__
raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str
D:\project\Leo\commands\ocnovnoe.py:477: RuntimeWarning: coroutine 'Client.user_vk_request' was never awaited
c = await self.bot.user_vk_request('photos.saveMessagesPhoto', photo=b['photo'], server=['server'], hash=b['hash'])[0]
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Ignoring exception in command тест:
Traceback (most recent call last):
File "D:\project\Leo\venv\lib\site-packages\vk_botting\commands.py", line 62, in wrapped
ret = await coro(*args, **kwargs)
File "D:\project\Leo\commands\ocnovnoe.py", line 477, in photo
c = await self.bot.user_vk_request('photos.saveMessagesPhoto', photo=b['photo'], server=['server'], hash=b['hash'])[0]
TypeError: 'coroutine' object is not subscriptable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\project\Leo\venv\lib\site-packages\vk_botting\bot.py", line 820, in invoke
await ctx.command.invoke(ctx)
File "D:\project\Leo\venv\lib\site-packages\vk_botting\commands.py", line 845, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "D:\project\Leo\venv\lib\site-packages\vk_botting\commands.py", line 71, in wrapped
raise CommandInvokeError(exc) from exc
vk_botting.exceptions.CommandInvokeError: Command raised an exception: TypeError: 'coroutine' object is not subscriptable
{'server': 850720, 'photo': '[{"markers_restarted":true,"photo":"24232fd0cd:z","sizes":[],"latitude":0,"longitude":0,"kid":"623ea9c1fcf5c092c09e5bb30b24078e","sizes2":[["s","bb0bb5f84ecc74c27077b24a44f96b78a38688913d61151ac2eecd57","-8948426774666194859",75,47],["m","4e95d4a2493760f6102b96971f4f4d4ba28afd1d40d4bc08ccb22cdc","7424489279040516911",130,81],["x","ca6185c19d3076e7ca098f0eae074fd3ed5ecf76a257edcf985e4188","5666038782456437582",604,377],["y","ab34df9a24cf4124603034ab3c1dc17300622bc46752f7c58bcee25c","-7319436552321038215",807,504],["z","7af0d30141f64ebe2fe8c9dba87095de83b20d5e3518eaf7be5de4ea","-4524142561723001457",1280,800],["o","5bc5eb8e9537f3fba845c2ea3c7f41bd399efaa87a69639e0563aa3d","6302533467391289737",130,87],["p","67fe7e6fe6f6c501784401e6869a7dc3e1e1532ed997c30172f8033b","7407183215490552013",200,133],["q","15664df899bf20ddcabdd6812cf139f8432e1ca52818916b4c628783","5039433027754640290",320,213],["r","b61ee303e6f64da7a7134ba3300c682407ca742199f8119444f101e4","5499859000876225307",510,340]],"urls":[],"urls2":["uwu1-E7MdMJwd7JKRPlreKOGiJE9YRUawu7NVw/VVBtXULN0IM.jpg","TpXUokk3YPYQK5aXH09NS6KK_R1A1LwIzLIs3A/L_Pno6kVCWc.jpg","ymGFwZ0wdufKCY8OrgdP0-1ez3aiV-3PmF5BiA/Thvnr0DQoU4.jpg","qzTfmiTPQSRgMDSrPB3BcwBiK8RnUvfFi87iXA/eQjlVjwjbJo.jpg","evDTAUH2Tr4v6MnbqHCV3oOyDV41GOr3vl3k6g/j1VGX08EN8E.jpg","W8XrjpU38_uoRcLqPH9BvTme-qh6aWOeBWOqPQ/iWne3MsYd1c.jpg","Z_5-b-b2xQF4RAHmhpp9w-HhUy7Zl8MBcvgDOw/zdCMueOZy2Y.jpg","FWZN-Jm_IN3KvdaBLPE5-EMuHKUoGJFrTGKHgw/osOvgKOp70U.jpg","th7jA-b2TaenE0ujMAxoJAfKdCGZ-BGURPEB5A/G1P2LZ9sU0w.jpg"]}]', 'hash': '73c948aa00927170bcc05a37da09bc6a'}
Got exception in request:
Retrying in 1 seconds
@command(name="добавить фото")
async def photoget(self, ctx, url=None):
t = url.split('=')[-1].split('/')[0]
with open("com.py", "a") as file:
f = file.write(t)
result = hug + [t]
print(result)
print(f)
if url is None:
await ctx.send("Укажите url адрес")
else:
await ctx.send("Фото успешно было добавленно", attachment=f'{t}')
@command(name="брак")
async def marriage(self, ctx, member=None):
user = await self.bot.get_user(ctx.from_id)
brak = await main().marriage(user)
try:
mem = re.findall(f"[0-9]+", member)[0]
br = await main().br(mem)
if member is None:
await ctx.send("Укажите пользователя с кем хотите заключить брак")
if brak != "Не в браке":
await ctx.send("Вы уже в браке")
elif br == 'Нету':
mem = re.findall(f"[0-9]+", member)[0]
await ctx.send("Запрос отправлен")
await main().br_req(user, mem)
elif br != 'Нету':
await ctx.send(f"Пользователю уже предложили брак")
else:
await ctx.send("Что то пошло не так")
except CommandInvokeError:
print(123)