vsakkas/sydney.py

File "c:\Users\robin\Music\Playlists\AI Jarvis Using Python Tut\sydney.py", line 286, in _upload_attachment raise ImageUploadException( exceptions.ImageUploadException: Failed to upload image, Copilot rejected uploading it Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x0000019E5C202A90> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000019E5C27E040>, 17450.718)]'] connector: <aiohttp.connector.TCPConnector object at 0x0000019E5C276490> import asyncio from sydney import SydneyClient from Body.Speak import Speak import nest_asyncio nest_asyncio.apply() async def main() -> None: async with SydneyClient() as sydney: response = await sydney.ask("What does this picture show?", attachment="img.jpg") print(response) if name == "main": asyncio.run(main())

robinai1212 opened this issue · 2 comments

File "c:\Users\robin\Music\Playlists\AI Jarvis Using Python Tut\sydney.py", line 286, in _upload_attachment
raise ImageUploadException(
exceptions.ImageUploadException: Failed to upload image, Copilot rejected uploading it
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000019E5C202A90>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000019E5C27E040>, 17450.718)]']
connector: <aiohttp.connector.TCPConnector object at 0x0000019E5C276490>

import asyncio
from sydney import SydneyClient
from Body.Speak import Speak
import nest_asyncio

nest_asyncio.apply()

async def main() -> None:
async with SydneyClient() as sydney:
response = await sydney.ask("What does this picture show?", attachment="img.jpg")
print(response)

if name == "main":
asyncio.run(main())

Hi @robinai1212

To be clear, is "img.jpg" a URL or a file path in your case? It should be a URL

Closing this one, because it's a duplicate