ludios / Desktopmagic

Robust multi-monitor screenshot grabbing library for Python 2.x/3.x on Windows
Other
59 stars 11 forks source link

Could not create DC #9

Open mndon opened 3 years ago

mndon commented 3 years ago

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.

ivan commented 3 years ago

Which script are you running? Python version? OS? Graphics driver? Number of monitors? Doing anything unusual? Thanks.