azure-search-openai-demo: Getting error during extracting text from pdf while ding deployment

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 29 (1 by maintainers)

Most upvoted comments

@pamelafox sent you the file with the same issues everyone is having above. . . . Ingesting ‘CS-25-Amendment-27.pdf’ Extracting text from ‘./data/CS-25-Amendment-27.pdf’ using Azure Document Intelligence Unable to retrieve continuation token: cannot pickle ‘_io.BufferedReader’ object Traceback (most recent call last): File “/workspaces/azure-search-openai-demo/.venv/lib/python3.11/site-packages/aiohttp/client_proto.py”, line 94, in connection_lost uncompleted = self._parser.feed_eof() ^^^^^^^^^^^^^^^^^^^^^^^ File “aiohttp/_http_parser.pyx”, line 516, in aiohttp._http_parser.HttpParser.feed_eof aiohttp.http_exceptions.ContentLengthError: 400, message: Not enough data for satisfy content length header.

. . . .

Hi, @pamelafox. What we’ve detected after plenty of internal tests is that large PDF files associated with the formula detection feature make the Document Intelligence service crash somehow. After we removed it, it started working nicely again.

PS: I’m flagging into this sample repo because we found it about the same issue we were facing.

I was able to replicate the error from @jacob-roach-hike2 -

Unable to retrieve continuation token: cannot pickle '_io.BufferedReader' object
(InternalServerError) An unexpected error occurred.
Code: InternalServerError
Message: An unexpected error occurred.
Exception Details:      (InternalServerError) An unexpected error occurred.
        Code: InternalServerError
        Message: An unexpected error occurred.
        Target: 0

I’ve sent the document, code, and error to the Document Intelligence team for them to hopefully replicate as well.