puremagic icon indicating copy to clipboard operation
puremagic copied to clipboard

Could not identify `.txt`

Open SimeonStoykovQC opened this issue 2 months ago • 1 comments

Creating a simple .txt file (UTF-8, unix-style line endings) results in

puremagic.main.PureError: Could not identify file

I see there is a test.txt file, but I am not familiar enough with this package to track whether it's really used in tests.

Thank you for developing this tool! Having a pure Python-based mime type support is great for backend file handling.

SimeonStoykovQC avatar Nov 04 '25 08:11 SimeonStoykovQC

Hi @SimeonStoykovQC thanks for the heads up! Have you tried with the upcoming 2.x version that has the scanner system? It has better text file identification

pip install puremagic~=2.0.0b4

cdgriffith avatar Nov 04 '25 18:11 cdgriffith