Closed jeremydefibaugh closed 4 years ago
Wondering if this is just me or not..
in PreviewBuilderFactory.get_file_mimetype:
str_, encoding = mimetypes_storage.guess_type(first_path, strict=False) returns (None, None) for a docx file.
str_, encoding = mimetypes_storage.guess_type(first_path, strict=False)
So then https://github.com/algoo/preview-generator/blob/develop/preview_generator/preview/builder_factory.py#L67-L69 returns the mimetype in bytes, causing get_preview_builder to fail.
I found that not calling MimeTypes() here https://github.com/algoo/preview-generator/blob/develop/preview_generator/extension.py fixes it.
Thinking it could be issues with my version of mimetype, or magic? Using Python 3.7.5
Resolved.. turns out the issue was an old version of python-magic..
Wondering if this is just me or not..
in PreviewBuilderFactory.get_file_mimetype:
str_, encoding = mimetypes_storage.guess_type(first_path, strict=False)
returns (None, None) for a docx file.So then https://github.com/algoo/preview-generator/blob/develop/preview_generator/preview/builder_factory.py#L67-L69 returns the mimetype in bytes, causing get_preview_builder to fail.
I found that not calling MimeTypes() here https://github.com/algoo/preview-generator/blob/develop/preview_generator/extension.py fixes it.
Thinking it could be issues with my version of mimetype, or magic? Using Python 3.7.5