python-needle / needle

Automated tests for your CSS.
https://needle.readthedocs.io/
Other
590 stars 50 forks source link

Error thrown out by PIL when using PerceptualDiff (Python 3.4) #61

Closed janrozycki closed 7 years ago

janrozycki commented 7 years ago

Problem which I encountered is very similar to issue #38 but a little bit different. When I'm running my script with default engine everything is fine but when I want to use PerceptualDiff following error is thrown:

Traceback (most recent call last): File "/home/jrozycki/selenium_and_python/needle_test.py", line 15, in test_masthead self.assertScreenshot('#nav-collapse', 'test_file') File "/opt/python3.4/lib/python3.4/site-packages/needle/cases.py", line 148, in assertScreenshot pass File "/opt/python3.4/lib/python3.4/contextlib.py", line 66, in exit next(self.gen) File "/opt/python3.4/lib/python3.4/site-packages/needle/cases.py", line 219, in compareScreenshot self.engine.assertSameFiles(output_file, baseline_file, threshold) File "/opt/python3.4/lib/python3.4/site-packages/needle/engines/perceptualdiff_engine.py", line 38, in assertSameFiles Image.open(diff_ppm).save(diff_png) File "/opt/python3.4/lib/python3.4/site-packages/PIL/Image.py", line 2349, in open % (filename if filename else fp)) nose.proxy.OSError: cannot identify image file '/home/jrozycki/selenium_and_python/screenshots/test_file.diff.ppm'

I'm using the newest version of needle (0.4.1) and PerceptualDiff works fine on it's own.