We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
General information:
Calling .grab in a loop twice with specific area configurations leads to gdi32.GetDIBits() failed after 4996..4998 loops
# ok #area1 = {"top": 100, "left": 100, "width": 400, "height": 320, "mon": 1 } #area2 = {"top": 200, "left": 200, "width": 320, "height": 320, "mon": 1 } # ok #area1 = {"top": 50, "left": 7, "width": 300, "height": 300, "mon": 1 } #area2 = {"top": 200, "left": 200, "width": 300, "height": 300, "mon": 1 } # fail area1 = {"top": 50, "left": 7, "width": 400, "height": 320, "mon": 1 } area2 = {"top": 200, "left": 200, "width": 320, "height": 320, "mon": 1 } i = 0 with mss.mss() as sct: while "Screen capturing": try: frame1 = sct.grab(area1) frame2 = sct.grab(area2) i += 1 except mss.ScreenShotError as e: print("fail at:", i) raise e
After one fail, rerunning the same script produces same error immediately. Have to restart Python to make it work for 4996 more loops.
fail at: 4996 ScreenShotError: gdi32.GetDIBits() failed.
Same behaviour at machine with Windows 7, Python 3.7.0 and different monitor configuration
The text was updated successfully, but these errors were encountered:
Could you try to use the version from the master branch?
Sorry, something went wrong.
tests: added regression tests for #128 and #135
257a314
aa467cb
54de3d9
It is fixed on master. I will release a new version in the week. Thanks for the report :)
No branches or pull requests
General information:
Description of the warning/error
Calling .grab in a loop twice with specific area configurations leads to gdi32.GetDIBits() failed after 4996..4998 loops
After one fail, rerunning the same script produces same error immediately. Have to restart Python to make it work for 4996 more loops.
Full message
fail at: 4996
ScreenShotError: gdi32.GetDIBits() failed.
Other details
Same behaviour at machine with Windows 7, Python 3.7.0 and different monitor configuration
The text was updated successfully, but these errors were encountered: