You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to capture specific parts of my screen so I can train an agent with reinforcement learning. For that reason I want high FPS screen input for really long periods of time (around 8 hours per session). So far I've been using really basic and simple code to test the mss python library, but after some minutes (it should be around 5) it drops an exception. Should be noted that the script works perfectly up to the point that throws the exception. Here's the code of the script:
it basically creates 3 separate windows of specific parts of the screen and it works with the desired fps, but it crashes with the following exception message:
Traceback (most recent call last):
File "C:/Users/Old_Friend/PycharmProjects/video_input/video_input.py", line 28, in <module>
sct_img = sct.grab(bounding_box_score)
File "C:\Users\Old_Friend\Anaconda3\lib\site-packages\mss\windows.py", line 301, in grab
raise ScreenShotError("gdi32.GetDIBits() failed.")
mss.exception.ScreenShotError: gdi32.GetDIBits() failed.
it seems like people have already shared this error here (when using windows?), but it does not seem like it is fixed yet.
I also tried:
declaring sct inside of the while,
declaring sct inside of the while and .close() right before declaring it,
catching the exception and ignoring it through continue, but it continued throwing the same exception non stop after the initial exception
RAM or CPU usage are not a concern. They stay at low values as shown in task manager.
The text was updated successfully, but these errors were encountered:
General information:
I am trying to capture specific parts of my screen so I can train an agent with reinforcement learning. For that reason I want high FPS screen input for really long periods of time (around 8 hours per session). So far I've been using really basic and simple code to test the mss python library, but after some minutes (it should be around 5) it drops an exception. Should be noted that the script works perfectly up to the point that throws the exception. Here's the code of the script:
it basically creates 3 separate windows of specific parts of the screen and it works with the desired fps, but it crashes with the following exception message:
it seems like people have already shared this error here (when using windows?), but it does not seem like it is fixed yet.
I also tried:
RAM or CPU usage are not a concern. They stay at low values as shown in task manager.
The text was updated successfully, but these errors were encountered: