Can't upload mp4 to client

Hey,
I am trying to analyze videos using gemini-2-flash
but i cannot upload the video to the client
i tried the example in the following cookbook: cookbook/quickstarts/Get_started.ipynb at 54459311ef77b21952bb15130fe33b6e3310a873 · google-gemini/cookbook · GitHub

this is my code:
from google import genai

from google.genai.types import HttpOptions, Part

import os

video_file_name = “BigBuckBunny_320x180.mp4”

client = genai.Client(api_key=os.getenv(‘GEMINI_API_KEY’))

video_file = client.files.upload(file=video_file_name)

i get this error:
httpx.WriteTimeout: The write operation timed out

Hi @Roi_Hezkiyahu , Welcome to the forum.

Just wondering, did you try with image or audio file? Is the issue happening only with video files?

It seems like an intermittent issue, possibly due to a slow internet connection or a server related problem. Try running the same code again and let me know if the issue still persists.

Hi @GUNAND_MAYANGLAMBAM
I was able to upload an image, did not try audio.
My internet connection is fine and the files is rather small, could it be some other issue?
also i tried running the exact notebook from colab and it didnt work.