AI Studio "Failed to count tokens for this attachment"

I am unable to ask the Gemini models about the Raspberry Pi RP2350 datasheet because of the error “Failed to count tokens for this attachment.”

Link to the datasheet in question: https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf

Simply try uploading the datasheet into AI Studio, and you will see the same error message. Hopefully this is a helpful test case for whoever is in charge of this feature.

2 Likes

Hey @coder543, your document exceeds the supported page limit of 1000 pages. Thats the reason you are unable to upload the file.

Try uploading a pdf below 1000 pages.

Thanks

1 Like

Thanks for the clarification. I wish the error message had just said that, because I’ve been trying this off and on again for several weeks to see if this was just a temporary issue with the backend. I also wish this limitation would be removed… either the end result would fit into the context window, or it wouldn’t, but the number of pages seems like an arbitrary division that isn’t connected to the number of tokens.

1 Like

Getting the same error with 278 pages pdf =\

Hey @Nario , Could you let me know the size of the PDF file??

Hi, @GUNAND_MAYANGLAMBAM .

I’ve tried several different files, all less than 300 pages and 100mb.

The last one I’ve tried was just 53,3 mb and 109 pages. I’ve tried both UI and API and it didn’t work.

I expected that there may be some problems because this pdf is with book scans, but it sometimes works on other pdf of that kind.

Some times i have problems even with small txt files with size of a couple mb.

Checking with the engineering team on this issue. Seems like there is an issue with large files. Thanks for escalating.

1 Like