Skip to content
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

wayland has problems with creating tutorials not working pag.screenshot(region=region) #2529

Open
ReimarBauer opened this issue Sep 18, 2024 · 1 comment
Labels
discussion upstream fix needed a dependency of us needs an improvement

Comments

@ReimarBauer
Copy link
Member

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/PIL/ImageGrab.py", line 78, in grab
    size, data = Image.core.grabscreen_x11(display_name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: X get_image failed: error 8 (73, 0, 1189)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/reimar/MAIN/MSS/tutorials/tutorial_mscolab.py", line 59, in automate_mscolab
    _connect_to_mscolab_url()
  File "/home/reimar/MAIN/MSS/tutorials/tutorial_mscolab.py", line 547, in _connect_to_mscolab_url
    find_and_click_picture('msuimainwindow-connect.png',
  File "/home/reimar/MAIN/MSS/tutorials/utils/__init__.py", line 307, in find_and_click_picture
    im = pag.screenshot(region=region)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/pyscreeze/__init__.py", line 603, in _screenshot_linux
    im = ImageGrab.grab()  # use Pillow's grab() for Pillow 9.2.0 and later.
         ^^^^^^^^^^^^^^^^
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/PIL/ImageGrab.py", line 88, in grab
    im = Image.open(filepath)
         ^^^^^^^^^^^^^^^^^^^^
  File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/PIL/Image.py", line 3498, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/tmp/tmpd1fej3nd.png'

@ReimarBauer
Copy link
Member Author

This needs a recheck if it is fixed
python-pillow/Pillow#6312

@ReimarBauer ReimarBauer added the upstream fix needed a dependency of us needs an improvement label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion upstream fix needed a dependency of us needs an improvement
Projects
None yet
Development

No branches or pull requests

1 participant