Closed barshag closed 2 months ago
@barshag, Could you please provide a minimal reproducible code to help us analyze the issue(SDK version, steps followed before you ran into this error or stand alone code/colab gist) to reproduce the issue faced. Thanks!
# Function to wait for files to become active
def wait_for_files_active(*files):
print("Waiting for file processing...")
for name in (file.name for file in files):
file = genai.get_file(name)
while file.state.name == "PROCESSING":
print(".", end="", flush=True)
time.sleep(12)
file = genai.get_file(name)
print(file.state.name)
if file.state.name == "FAILED":
print(file)
raise ValueError(file.state.name)
if file.state.name != "ACTIVE":
print("()()())(()()())")
print(file)
raise Exception(f"File {file.name} failed to process")
print("...all files ready")
generativeai 0.7.2
It's pretty unstable... you should create much more valuable error messages... it's feel like blind debugging...
How often does this happen? Is this for some specific file, or at random here and there? If you retry with the same file does it pass the second time?
So far I've never gotten a state:FAILED
. Any tips to help me reproduce this problem would be helpful.
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
This issue was closed because it has been inactive for 28 days. Please post a new issue if you need further assistance. Thanks!
Description of the bug:
I tried to upload file, and wait for the status to be "ACTIVE" but got "FAILED" and this message:
This is critical bug for me! please help me.
Actual vs expected behavior:
get ACTIVE instead of failed
Any other information you'd like to share?
No response