Skip to content
New issue

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

Could not create DC #9

Open
mndon opened this issue Apr 6, 2021 · 1 comment
Open

Could not create DC #9

mndon opened this issue Apr 6, 2021 · 1 comment

Comments

@mndon
Copy link

mndon commented Apr 6, 2021

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
Copy link
Member

ivan commented Apr 6, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants