File api always PROCESSING

I recently received the following error: google.genai.errors.ClientError: 400 FAILED_PRECONDITION." {‘error’: {‘code’: 400, ‘message’: ‘The file laxcbdgggxx7 is not in an active state, and usage is not allowed’, ‘status’: ‘FAILED_PRECONDITION’}. I tried to check the state, and it’s FileState.PROCESSING: ‘PROCESSING’. after waiting 30 minutes, it’s still not working. What’s going on? Everything was fine last night, but today it’s broken. The image upload is working fine, but the video upload is not.

sorry, just slow, not stuck. i used wrong way to check. myfile.state don’t use this way.

for f in client.files.list():
    print(' ', f.state)

this is right

1 Like