Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 12] Cannot allocate memory #278

Open
sentry-io bot opened this issue Oct 9, 2023 · 1 comment
Open

OSError: [Errno 12] Cannot allocate memory #278

sentry-io bot opened this issue Oct 9, 2023 · 1 comment

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 9, 2023

File "unstructured/partition/pdf.py", line 155, in partition_pdf
    return partition_pdf_or_image(
  File "unstructured/partition/pdf.py", line 304, in partition_pdf_or_image
    return _partition_pdf_or_image_with_ocr(
  File "unstructured/utils.py", line 159, in wrapper
    return func(*args, **kwargs)
  File "unstructured/partition/pdf.py", line 795, in _partition_pdf_or_image_with_ocr
    _text, _bboxes = unstructured_pytesseract.run_and_get_multiple_output(
  File "unstructured_pytesseract/pytesseract.py", line 305, in run_and_get_multiple_output
    with save(image) as (temp_name, input_filename):
  File "contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "unstructured_pytesseract/pytesseract.py", line 211, in save
    image.save(input_file_name, format=image.format)
  File "PIL/Image.py", line 2413, in save
    save_handler(self, fp, filename)
  File "PIL/PpmImagePlugin.py", line 329, in _save
    ImageFile._save(im, fp, [("raw", (0, 0) + im.size, 0, (rawmode, 0, 1))])
  File "PIL/ImageFile.py", line 517, in _save
    _encode_tile(im, fp, tile, bufsize, fh)
  File "PIL/ImageFile.py", line 544, in _encode_tile
    errcode = encoder.encode_to_file(fh, bufsize)
@awalker4
Copy link
Collaborator

awalker4 commented Oct 9, 2023

We've also seen this for disk space:

OSError: [Errno 28] No space left on device
  File "unstructured/partition/pdf.py", line 155, in partition_pdf
    return partition_pdf_or_image(
  File "unstructured/partition/pdf.py", line 304, in partition_pdf_or_image
    return _partition_pdf_or_image_with_ocr(
  File "unstructured/utils.py", line 159, in wrapper
    return func(*args, **kwargs)
  File "unstructured/partition/pdf.py", line 795, in _partition_pdf_or_image_with_ocr
    _text, _bboxes = unstructured_pytesseract.run_and_get_multiple_output(
  File "unstructured_pytesseract/pytesseract.py", line 305, in run_and_get_multiple_output
    with save(image) as (temp_name, input_filename):
  File "contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "unstructured_pytesseract/pytesseract.py", line 211, in save
    image.save(input_file_name, format=image.format)
  File "PIL/Image.py", line 2413, in save
    save_handler(self, fp, filename)
  File "PIL/PpmImagePlugin.py", line 329, in _save
    ImageFile._save(im, fp, [("raw", (0, 0) + im.size, 0, (rawmode, 0, 1))])
  File "PIL/ImageFile.py", line 517, in _save
    _encode_tile(im, fp, tile, bufsize, fh)
  File "PIL/ImageFile.py", line 544, in _encode_tile
    errcode = encoder.encode_to_file(fh, bufsize)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant