I’m getting this error suddenly when using the gemini-1.5-flash model.
It says
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1731955515.629532 17124 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.
there is no response being printed -
import google.generativeai as genai
genai.configure(api_key='')
model = genai.GenerativeModel("gemini-1.5-flash")
response = model.generate_content("Explain how AI works")
print(response.text)
Same issue.
With flash and exp-1121.
Interestingly, when I send the output (via print) to stdout I can read it and then I see the error but when I’m using Gemini’s response in a script it seems to not save the response due to the error.
(Didn’t do a full debug, but that’s what it seems like so far)
+1 same issue here
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1732664313.522866 17588 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.
It seems like several users, including myself, have encountered the “grpc_wait_for_shutdown_with_timeout() timed out” error. I appreciate the suggestion to try installing grpcio==1.67.1. I’m going to give that a shot and see if it resolves the issue for me as well.