Run the script for a long time, run for more than 12 hours, it will report this error.
File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 365, in getScreenAsImage
return _getRectAsImage(None)
File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 328, in _getRectAsImage
dc, bitmap = getDCAndBitMap(rect=rect)
File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 223, in getDCAndBitMap
mfcDC = win32ui.CreateDCFromHandle(hwndDevice)
win32ui.error: Could not create DC.
Run the script for a long time, run for more than 12 hours, it will report this error.
File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 365, in getScreenAsImage return _getRectAsImage(None) File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 328, in _getRectAsImage dc, bitmap = getDCAndBitMap(rect=rect) File "F:\myself\apprunner_client\apprunner_client\venv\lib\site-packages\desktopmagic\screengrab_win32.py", line 223, in getDCAndBitMap mfcDC = win32ui.CreateDCFromHandle(hwndDevice) win32ui.error: Could not create DC.