-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PerceptualDiff and Python 3.4.1 exception #38
Comments
It looks like this was fixed in the source last July: https://github.com/bfirsh/needle/commits/master/needle/engines/perceptualdiff_engine.py Is it possible that you have a version earlier than 0.2.2 installed? |
I've got 0.2.2 installed according to PIP - I initially installed maybe 3 months ago. |
It looks like that fix was pushed after the 0.2.2 release, so we'd need to cut a new release. I could do that in the next couple of days unless someone beats me to it :) |
I've just released version 0.2.3. Could you please update and check if that fixes it? Thanks! |
Will do first thing tomorrow - thanks ! |
Looks good! Thanks so much for pushing an update that quickly, it is appreciated! |
Great, thanks for checking! |
Have some prototype tests written using Needle and Python 3.4.1. When the tests run with the default image comparison setting they run fine. When I added PerceptualDiff to the tests, an ugly exception gets thrown coming out of PIL.
Traceback (most recent call last):
File "D:\Temp\TestDev\Needle_Tests_Workflow\Needle_Tests_Workflow\Needle_Tests_Workflow.py", line 42, in test_loginPage
self.assertScreenshot('body', 'body')
File "D:\Python34\lib\site-packages\needle\cases.py", line 128, in assertScreenshot
pass
File "D:\Python34\lib\contextlib.py", line 66, in exit
next(self.gen)
File "D:\Python34\lib\site-packages\needle\cases.py", line 198, in compareScreenshot
self.engine.assertSameFiles(output_file, baseline_file, threshold)
File "D:\Python34\lib\site-packages\needle\engines\perceptualdiff_engine.py", line 16, in assertSameFiles
width, height = Image.open(open(output_file)).size
File "D:\Python34\lib\site-packages\PIL\Image.py", line 2255, in open
prefix = fp.read(16)
File "D:\Python34\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
nose.proxy.UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 49: character maps to
The text was updated successfully, but these errors were encountered: