@@ -324,7 +324,6 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
324
324
# try without it:
325
325
return impl (["inkscape" , "-V" ], "Inkscape ([^ ]*)" )
326
326
elif name == "magick" :
327
- path = None
328
327
if sys .platform == "win32" :
329
328
# Check the registry to avoid confusing ImageMagick's convert with
330
329
# Windows's builtin convert.exe.
@@ -339,18 +338,24 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
339
338
binpath = winreg .QueryValueEx (hkey , "BinPath" )[0 ]
340
339
except OSError :
341
340
pass
341
+ path = None
342
342
if binpath :
343
343
for name in ["convert.exe" , "magick.exe" ]:
344
344
candidate = Path (binpath , name )
345
345
if candidate .exists ():
346
346
path = str (candidate )
347
347
break
348
+ if path is None :
349
+ raise ExecutableNotFoundError (
350
+ "Failed to find an ImageMagick installation" )
348
351
else :
349
352
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
351
356
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
354
359
elif name == "pdftops" :
355
360
info = impl (["pdftops" , "-v" ], "^pdftops version (.*)" ,
356
361
ignore_exit_code = True )
0 commit comments