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

Code breaks for base64 image source, saying OSError: [Errno 36] File name too long #28

Open
maifeeulasad opened this issue Dec 23, 2021 · 3 comments

Comments

@maifeeulasad
Copy link

I'm trying to create a document with image, and that image has a base64 value as it's source. But when I try add this, it gives me, error saying it has a long name:

/usr/local/lib/python3.8/dist-packages/docx/image/image.py in from_file(cls, image_descriptor)
     44         if is_string(image_descriptor):
     45             path = image_descriptor
---> 46             with open(path, 'rb') as f:
     47                 blob = f.read()
     48                 stream = BytesIO(blob)

OSError: [Errno 36] File name too long: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QDeRXhpZgAASUkqAAgAAAAGABIBAwABAAAAAQAAABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAgAAABMCAwABAAAAAQAAAGmHBAABAAAAZgAAAAAAAAA4YwAA6AMAADhjAADoAwAABwAAkAcABAAAADAyMTABkQcABAAAAAECAwCGkgcAFgAAAMAAAAAAoAcABAAAADAxMDABoAMAAQAAAP//AAACoAQAAQAAAMgAAAADoAQAAQAAAMgAAAAAAAAAQVNDSUkAAABQaWNzdW0gSUQ6IDUxNP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicgIiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/CABEIAMgAyAMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAEAAECAwUGB//EABgBAQEBAQEAAAAAAAAAAAAAAAABAgME/9oADAMBAAIQAxAAAAHtEn1Uq81nXXMPrPTrnZy76xHXbWLKNhY7mwseJtPho3Gw2s2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vKV3gNY6Qq19Spf64VVDoe8AuqKOV3DyE449pXFe0XeEuXTmZmVr6jY0z8wAAzmVSePxKVxRzkwTdeJReOPibm0Q2IzsmFe5V0IQyoD2jnKvSZG+r1lW12KYiaz1xE5xa6bgtDC+kotYnmASqf+TGyztHAXmG5fZEpsfWBF2bKLapn/2Q=='

The HTML given to it, is pretty simple:

<p><img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QDeRXhpZgAASUkqAAgAAAAGABIBAwABAAAAAQAAABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAgAAABMCAwABAAAAAQAAAGmHBAABAAAAZgAAAAAAAAA4YwAA6AMAADhjAADoAwAABwAAkAcABAAAADAyMTABkQcABAAAAAECAwCGkgcAFgAAAMAAAAAAoAcABAAAADAxMDABoAMAAQAAAP//AAACoAQAAQAAAMgAAAADoAQAAQAAAMgAAAAAAAAAQVNDSUkAAABQaWNzdW0gSUQ6IDUxNP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicgIiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/CABEIAMgAyAMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAEAAECAwUGB//EABgBAQEBAQEAAAAAAAAAAAAAAAABAgME/9oADAMBAAIQAxAAAAHtEn1Uq81nXXMPrPTrnZy76xHXbWLKNhY7mwseJtPho3Gw2s2LsM2XQVVudJJFNdirHwO24TKqVHVY1zr9BVZhyK0pcRb+WCKLZ1Yt2NmItsWUGWoRWJcbKXTOjf15snVlKdVDk+t5TKjZytcHmy6c6HnTnRFUdUwG0S/P3rHNyvRyPonLl0oMgZNUzKZCZ1t0xNRUSTrWYcp1fKS16edDF1KwIhRIKU63L15Q4XQlKpkNYRGq1o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p>

Just an image inside a paragraph.

@djplaner
Copy link

Had a similar issue, my solution was to make the following local changes to h2d.py - inspired by this StackOverflow answer

No exhaustive testing but appears to be working for my purposes.

Add some extra imports at the top

import base64
import io

Add a base64 check and conversion to handle_img

This is added just before the # add image to doc comment

# check if image starts with data:.*base64,
if image and image.startswith('data:image/'):
    #-- convert to bytes ready to insert to docx
    image = image.split(',')[1]
    image = base64.b64decode(image)
    image = io.BytesIO(image)

@alexmaehon
Copy link

Had a similar issue, my solution was to make the following local changes to h2d.py - inspired by this StackOverflow answer

No exhaustive testing but appears to be working for my purposes.

Add some extra imports at the top

import base64
import io

Add a base64 check and conversion to handle_img

This is added just before the # add image to doc comment

# check if image starts with data:.*base64,
if image and image.startswith('data:image/'):
    #-- convert to bytes ready to insert to docx
    image = image.split(',')[1]
    image = base64.b64decode(image)
    image = io.BytesIO(image)

It works!

@coolkau
Copy link

coolkau commented Nov 13, 2022

I had a similar issue, rather than embedding the image this line is in the word document:

<image: fZvATdwBXdw45YLCfdwET=>

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

4 participants