I'm trying to upload image to telegraph
My Code:
from telegraph import Telegraph
def upload_to_telegraph(image_path):
uploaded_image = Telegraph().upload_file(image_path)
image_url = f"https://telegra.ph{uploaded_image[0]['src']}"
return image_url
print(upload_to_telegraph("Picture1.jpg"))
Error I'm Getting.
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
Edit: its working in replit but not in my editor any solutin?