wand 0.6.11 running in the context of squish with python 3.8 seems to require 2 constructor arguments. Which arguments?
I want to use wand.image to compare the result of an image export function of a different tool. I've imported wand 0.6.11 for python, and tried it with success on the command line, with python 3.8 and 3.10, that I have available. In the terminal, I successfully call this, to convert a PDF to PNG:
from wand.image import Image
with Image(filename="testfile.pdf") as img:
...
But when executed in the context of the test framework squish, where I also use a python 3.8 interpreter, which has imported version 0.6.11 of wand, calling the same snippet raises this exception:
RuntimeError: The Image() constructor takes at least two arguments
I have tried adding several more arguments, e.g. like this:
Image(filename="testfile.pdf", format='pdf',
background="white", resolution=150, colorspace="srgb")
... but continue to get the same RuntimeError.
I tried to read the wand source for the Image constructor on github, but didn't manage to resolve my issue. What puzzles me is, why the same module would behave differently within the squish framework and on the commandline.
Does anyone here understand how I can get this right?