title: Python-Magic 'could not find any valid magic files!'
body: <p>I want to use <code>Python-Magic</code> library, but I get:</p>
  
  <blockquote>
    <p>magic.magic.MagicException: b'could not find any valid magic files!'</p>
  </blockquote>
  
  <p>Error on a simple code like this:</p>
  
  <pre><code>filepath = 'path\\somefile.txt'
  print(magic.from_file(filepath))
  </code></pre>
  
  <p>I did google the error message and I tried this; as mentioned <a href="https://stackoverflow.com/questions/14761961/missing-files-for-magic-library-on-windows">Missing files for `magic` library on Windows</a> </p>
  
  <pre><code>magic_object = magic.Magic(magic_file = 'C:\\Program Files (x86)\\GnuWin32\\share\\misc\\magic')
  </code></pre>
  
  <p>This time I get this error:</p>
  
  <blockquote>
    <p>magic.magic.MagicException: b"File 5.32 supports only version 14 magic files. `C:\Program Files (x86)\GnuWin32\share\misc\magic.mgc' is version 7"</p>
  </blockquote>
  
  <p>I also did this; <a href="https://stackoverflow.com/questions/41390318/python-error-file-5-3-supports-only-version-7-magic-file">Python Error : File 5.3 supports only version 7 magic file</a> nothing changes.</p>
  
  <p>Also I tried changing environment variable<code>MAGIC=path\to\gnuwin32\share\misc\magic</code> and downloading <a href="http://gnuwin32.sourceforge.net/packages/file.htm" rel="nofollow noreferrer">http://gnuwin32.sourceforge.net/packages/file.htm</a> and nothing changes.</p>
  
  <p>Thanks in advance,</p>