Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 5bc2e3f

Browse files
committed
exception variant
1 parent d583ab0 commit 5bc2e3f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

zxing/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def decode(self, filenames, try_harder=False, possible_formats=None, pure_barcod
6161
if stdout.startswith((b'Error: Could not find or load main class com.google.zxing.client.j2se.CommandLineRunner',
6262
b'Exception in thread "main" java.lang.NoClassDefFoundError:')):
6363
raise BarCodeReaderException("Java JARs not found in classpath (%s)" % self.classpath, self.classpath)
64-
elif stdout.startswith(b'''Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL!'''):
64+
elif stdout.startswith((b'''Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL!''',
65+
b'''Exception in thread "main" java.util.concurrent.ExecutionException: javax.imageio.IIOException: Can't get input stream from URL!''')):
6566
raise BarCodeReaderException("Could not find image path: %s" % filenames, filenames)
6667
elif stdout.startswith(b'''Exception in thread "main" java.io.IOException: Could not load '''):
6768
raise BarCodeReaderException("Java library could not read image; is it in a supported format?", filenames)

0 commit comments

Comments
 (0)