diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..55d37d2 Binary files /dev/null and b/.DS_Store differ diff --git a/miniwob/screenshot.py b/miniwob/screenshot.py index 9fe6f9b..f333fac 100644 --- a/miniwob/screenshot.py +++ b/miniwob/screenshot.py @@ -41,7 +41,13 @@ def get_screenshot( if icc_profile: orig_icc = ImageCms.ImageCmsProfile(BytesIO(icc_profile)) srgb_icc = ImageCms.createProfile("sRGB") - pil_image = ImageCms.profileToProfile(pil_image, orig_icc, srgb_icc) + pil_image = ImageCms.profileToProfile( + pil_image, orig_icc, srgb_icc, inPlace=False + ) + + if pil_image is None: + raise ValueError("profileToProfile returned None unexpectedly") + return pil_image diff --git a/pyproject.toml b/pyproject.toml index cc69139..52c2623 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ - "Gymnasium>=1.0.0a1", + "Gymnasium>=1.0.0", "Pillow>=9.0.0", "selenium>=4.5.0", "numpy>=1.18.0",