SMQTK icon indicating copy to clipboard operation
SMQTK copied to clipboard

file-magic isn't listed in requirements.txt

Open fishcorn opened this issue 8 years ago • 2 comments

file-magic is a dependency in setup.py, but the Docker builds don't use that method.

Because the Docker image doesn't include it, when an image import is attempted with the caffe plugin, it fails to detect the file type and skips all inputs (producing many debug log outputs).

EDITED to add: There's barely any (if at all) indication that file-magic is what's needed. This can be frustrating to the uninitiated user.

fishcorn avatar Mar 28 '17 12:03 fishcorn

Related: #297

danlamanna avatar Mar 28 '17 13:03 danlamanna

The file-magic module is no longer used in implicit functionality and is no longer a dependency in smqtk's setup.py. This to some degree resolves the title of this issue but does not resolve the usability issue that you mentioned (I think). The underlying issue is of lacking the right documentation for certain applications/utilities.

It is now the case that applications need to handle checking the presence of, or assigning loaded data a mimetype appropriately. When loaded data is a local file, whether that means making sure files have extensions or optionally running known filepaths through one of the smqtk.utils.file_utils module's inspection methods: file_mimetype_filemagic or file_mimetype_tika.

Personally, I don't think that I consider a descriptor-generator raising an error a bad thing when given mimetype-less data elements.

Purg avatar Nov 17 '17 23:11 Purg