Skip to content

transform.ext attribute in images not available #56

@anuar12

Description

@anuar12
Traceback (most recent call last):
  File "/app/app/services/file_extraction_service.py", line 162, in extract_html
    output = xlsx2html(io.BytesIO(file_content), sheet=-1)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/xlsx2html/core.py", line 403, in xlsx2html
    data = worksheet_to_data(
           ^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/xlsx2html/core.py", line 264, in worksheet_to_data
    return {"rows": data_list, "cols": col_list, "images": images_to_data(ws)}
                                                           ^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/xlsx2html/core.py", line 155, in images_to_data
    _id = image_to_data(_i)
          ^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/xlsx2html/core.py", line 138, in image_to_data
    "width": units.EMU_to_pixels(transform.ext.width),
                                 ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ext'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions