@@ -324,7 +324,6 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
324324 # try without it:
325325 return impl (["inkscape" , "-V" ], "Inkscape ([^ ]*)" )
326326 elif name == "magick" :
327- path = None
328327 if sys .platform == "win32" :
329328 # Check the registry to avoid confusing ImageMagick's convert with
330329 # Windows's builtin convert.exe.
@@ -339,18 +338,24 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
339338 binpath = winreg .QueryValueEx (hkey , "BinPath" )[0 ]
340339 except OSError :
341340 pass
341+ path = None
342342 if binpath :
343343 for name in ["convert.exe" , "magick.exe" ]:
344344 candidate = Path (binpath , name )
345345 if candidate .exists ():
346346 path = str (candidate )
347347 break
348+ if path is None :
349+ raise ExecutableNotFoundError (
350+ "Failed to find an ImageMagick installation" )
348351 else :
349352 path = "convert"
350- if path is None :
353+ info = impl ([path , "--version" ], r"^Version: ImageMagick (\S*)" )
354+ if info .version == "7.0.10-34" :
355+ # https://github.com/ImageMagick/ImageMagick/issues/2720
351356 raise ExecutableNotFoundError (
352- "Failed to find an ImageMagick installation " )
353- return impl ([ path , "--version" ], r"^Version: ImageMagick (\S*)" )
357+ f"You have ImageMagick { info . version } , which is unsupported " )
358+ return info
354359 elif name == "pdftops" :
355360 info = impl (["pdftops" , "-v" ], "^pdftops version (.*)" ,
356361 ignore_exit_code = True )
0 commit comments