Closed macielti closed 4 years ago
ImportError class is present in all versions of Python, including latest: https://docs.python.org/3.9/library/exceptions.html#ImportError ModuleNotFoundError is present only in 3.6 and later. Also ModuleNotFoundError is a subclass of ImportError, so ImportError would also catch ModuleNotFoundError.
Can you explain why do you think this change is necessary?
When i tried to run the demo/scan.py
on a Windows 7 32bits with Python 3.7.5 produces the following error:
The pull request changes solved the problem.
Line numbers don't match in your error message with source code. You probably have older version. Can you try latest version from github?
Yes. With a new fresh install of python 3.7.5 32bits on Windows 7 32bits:
pip install .
;demo
folder and try to run python scan.py test.png
. After the scanner been activated and the progress bar is comming to the end i got this message error:
pip install pillow
and again try to run python scan.py teste.png
;Pillow module
as a dependence.
Changed the ImportError exception to NotFoundModule what is python3 compatible.
Now you are abble to run the demo/scan.py script with no problems when using python3.