Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemini API: Prompting with Video - genai.upload_file [Errno 60] Operation timed out #73

Closed
maxuechaogao opened this issue Apr 17, 2024 · 7 comments
Labels
component:examples Issues/PR referencing examples folder status:awaiting response Awaiting a response from the author type:bug Something isn't working

Comments

@maxuechaogao
Copy link

image
image

@maxuechaogao
Copy link
Author

How should I handle it so that I can execute the function to upload files locally? Additionally, what does this function correspond to 【POST https://generativelanguage.googleapis.com/upload/v1beta/files】?

@TYMichaelChen
Copy link
Collaborator

Hi, are you running this in an available region by the way? Seems like this might be related to the other issue: #72

@maxuechaogao
Copy link
Author

Hi, are you running this in an available region by the way? Seems like this might be related to the other issue: #72
Yes, I am using a US node

@singhniraj08 singhniraj08 added type:bug Something isn't working status:awaiting response Awaiting a response from the author component:examples Issues/PR referencing examples folder labels Apr 19, 2024
@garmanwu
Copy link

the same proble,genai.upload_file time out.

@garmanwu
Copy link

garmanwu commented Apr 20, 2024

I find the solution.

Make sure Audio.ipynb works fine. That means the server end is OK.
https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Audio.ipynb

The error happens in the network connection even you change the VPN node. You can set python code as below:
os.environ['http_proxy']='http://127.0.0.1:7890'
os.environ['https_proxy']='http://127.0.0.1:7890'
os.environ['all_proxy']='socks5://127.0.0.1:7890'
genai.configure(api_key=GOOGLE_API_KEY,transport='rest')

It works fine for me. Good luck~

@maxuechaogao
Copy link
Author

I find the solution.

Make sure Audio.ipynb works fine. That means the server end is OK. https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Audio.ipynb

The error happens in the network connection even you change the VPN node. You can set python code as below: os.environ['http_proxy']='http://127.0.0.1:7890' os.environ['https_proxy']='http://127.0.0.1:7890' os.environ['all_proxy']='sock5://127.0.0.1:7890' genai.configure(api_key=GOOGLE_API_KEY,transport='rest')

It works fine for me. Good luck~

Thank you very much. This configuration is indeed feasible

@wangy325
Copy link

wangy325 commented Jul 6, 2024

I find the solution.

Make sure Audio.ipynb works fine. That means the server end is OK. https://colab.research.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Audio.ipynb

The error happens in the network connection even you change the VPN node. You can set python code as below: os.environ['http_proxy']='http://127.0.0.1:7890' os.environ['https_proxy']='http://127.0.0.1:7890' os.environ['all_proxy']='socks5://127.0.0.1:7890' genai.configure(api_key=GOOGLE_API_KEY,transport='rest')

It works fine for me. Good luck~

Works for me. thx a lot 😀 By the way, genai is not supported in HongKong, that's sad😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting response Awaiting a response from the author type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants