{"action":"created","issue":{"url":"https://api.github.com/repos/BoboTiG/python-mss/issues/115","repository_url":"https://api.github.com/repos/BoboTiG/python-mss","labels_url":"https://api.github.com/repos/BoboTiG/python-mss/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/BoboTiG/python-mss/issues/115/comments","events_url":"https://api.github.com/repos/BoboTiG/python-mss/issues/115/events","html_url":"https://github.com/BoboTiG/python-mss/issues/115","id":419204063,"node_id":"MDU6SXNzdWU0MTkyMDQwNjM=","number":115,"title":"XGetImage() failed when using mss","user":{"login":"mazjindeel","id":7277916,"node_id":"MDQ6VXNlcjcyNzc5MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/7277916?v=4","gravatar_id":"","url":"https://api.github.com/users/mazjindeel","html_url":"https://github.com/mazjindeel","followers_url":"https://api.github.com/users/mazjindeel/followers","following_url":"https://api.github.com/users/mazjindeel/following{/other_user}","gists_url":"https://api.github.com/users/mazjindeel/gists{/gist_id}","starred_url":"https://api.github.com/users/mazjindeel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazjindeel/subscriptions","organizations_url":"https://api.github.com/users/mazjindeel/orgs","repos_url":"https://api.github.com/users/mazjindeel/repos","events_url":"https://api.github.com/users/mazjindeel/events{/privacy}","received_events_url":"https://api.github.com/users/mazjindeel/received_events","type":"User","site_admin":false},"labels":[{"id":504186471,"node_id":"MDU6TGFiZWw1MDQxODY0NzE=","url":"https://api.github.com/repos/BoboTiG/python-mss/labels/GNU/Linux","name":"GNU/Linux","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-03-10T16:25:19Z","updated_at":"2019-03-10T20:15:41Z","closed_at":null,"author_association":"NONE","body":"General information:\r\n\r\n* OS name: _Debian GNU/Linux_Ubuntu\r\n* OS version: 18.10\r\n* OS architecture: _64 bits_\r\n* Resolutions:\r\n    * Monitor 1: _1920x1080_\r\n    * Monitor 2: _1920x1080_\r\n* Python version: _3.7.1_\r\n* MSS version: __4.0.2__\r\n\r\n\r\nFor GNU/Linux users:\r\n\r\n* Display server protocol and version, if known: __X server__ wayland\r\n* Desktop Environment: Unity\r\n* Composite Window Manager name and version: [not sure, it's gonna be whatever ubuntu 18.10 uses by default - I haven't configured any of this stuff]\r\n\r\n\r\n### Description of the warning/error\r\nWhen I use any screen capture command (grab(), shot()), I get an error that XGetImage failed. \r\ncode: \r\n`pipenv install mss` \r\n\r\nand in file `process.py`, I have taken some code straight the examples in documentation:\r\n```\r\nimport mss\r\nwith mss.mss() as sct:\r\n    try:\r\n        filename = sct.shot(mon=-1, output='fullscreen.png')\r\n        print(filename)\r\n    except Exception as e:\r\n        print(e, \"\\n\", e.details)\r\n```\r\nThe above code outputs this: \r\n```\r\nXGetImage() failed\r\n {'retval': <mss.linux.LP_XImage object at 0x7fc72d567bf8>, 'args': (<mss.linux.LP_Display object at 0x7fc72db7d1e0>, <mss.linux.LP_Display object at 0x7fc72d567950>, 0, 0, 1920, 1080, 16777215, 2)}\r\n```\r\n\r\nAnd the stracktrace looks like this: \r\n```\r\nTraceback (most recent call last):\r\n  File \"process.py\", line 3, in <module>\r\n    filename = sct.shot(mon=-1, output='fullscreen.png')\r\n  File \"/home/f41lurizer/.local/share/virtualenvs/poker-TAtsjijf/lib/python3.7/site-packages/mss/base.py\", line 140, in shot\r\n    return next(self.save(**kwargs))\r\n  File \"/home/f41lurizer/.local/share/virtualenvs/poker-TAtsjijf/lib/python3.7/site-packages/mss/base.py\", line 129, in save\r\n    sct = self.grab(monitor)\r\n  File \"/home/f41lurizer/.local/share/virtualenvs/poker-TAtsjijf/lib/python3.7/site-packages/mss/linux.py\", line 430, in grab\r\n    ZPIXMAP,\r\n  File \"/home/f41lurizer/.local/share/virtualenvs/poker-TAtsjijf/lib/python3.7/site-packages/mss/linux.py\", line 171, in validate\r\n    raise ScreenShotError(err, details=details)\r\nmss.exception.ScreenShotError: XGetImage() failed\r\n```\r\n\r\n### Other details\r\nI have also tried running as root, and running outside of tmux. Neither of these things changed the error I'm getting. I wonder if this has something to do with using wayland? On pyscreenshot, they seem to have limited support for screenshots on wayland. \r\n"},"comment":{"url":"https://api.github.com/repos/BoboTiG/python-mss/issues/comments/471340024","html_url":"https://github.com/BoboTiG/python-mss/issues/115#issuecomment-471340024","issue_url":"https://api.github.com/repos/BoboTiG/python-mss/issues/115","id":471340024,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MTM0MDAyNA==","user":{"login":"BoboTiG","id":2033598,"node_id":"MDQ6VXNlcjIwMzM1OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/2033598?v=4","gravatar_id":"","url":"https://api.github.com/users/BoboTiG","html_url":"https://github.com/BoboTiG","followers_url":"https://api.github.com/users/BoboTiG/followers","following_url":"https://api.github.com/users/BoboTiG/following{/other_user}","gists_url":"https://api.github.com/users/BoboTiG/gists{/gist_id}","starred_url":"https://api.github.com/users/BoboTiG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoboTiG/subscriptions","organizations_url":"https://api.github.com/users/BoboTiG/orgs","repos_url":"https://api.github.com/users/BoboTiG/repos","events_url":"https://api.github.com/users/BoboTiG/events{/privacy}","received_events_url":"https://api.github.com/users/BoboTiG/received_events","type":"User","site_admin":false},"created_at":"2019-03-10T20:15:41Z","updated_at":"2019-03-10T20:15:41Z","author_association":"OWNER","body":"The new stack trace is OK actually, I will fix it later. But the issue remains.\r\n\r\nI will have to download the same Ubuntu version as yours to test, could you point me to th ISO you used?"}}
{"actor":{"display_login":"BoboTiG"}}