python-mss icon indicating copy to clipboard operation
python-mss copied to clipboard

Black image after screenshot: Windows Server 2016 , Python 3.6.0

Open codingsett opened this issue 7 years ago • 7 comments

Hello when am logged in to the remote desktop server the screenshot works fine but when i close the rdp all i get is a black image after screenshots. Why could it be so?Any suggestions on how to fix it?Thanks

codingsett avatar Aug 19 '18 15:08 codingsett

Hello,

Did you try to disable the RDP screensaver? This answer points some clues.

BoboTiG avatar Aug 19 '18 15:08 BoboTiG

@BoboTiG The screensaver is disabled but the issue still persists

codingsett avatar Aug 19 '18 16:08 codingsett

I am afraid your on your own (I have no machine for testing now) :/ Also this is not a MSS error but a Windows configuration to tweak.

If you finally get MSS to work with a closed connection, I would be happy to update the documentation.

BoboTiG avatar Aug 19 '18 16:08 BoboTiG

I have similar issue when running a script that takes a full screen screenshot; running the code on console works but running the script from a windows service app only returns a black screen

jaguilera avatar Oct 10 '18 21:10 jaguilera

As @graz68a did (see that comment), using pythonw.exe instead of python.exe may fix the black screen issue.

Could you confirm?

BoboTiG avatar Feb 06 '20 13:02 BoboTiG

I run into the same issue, but using pythonw didn't solve it at least for me.

jlintusaari avatar Mar 17 '20 11:03 jlintusaari

It seems the problem is more with that the screen is locked when you log out from an RDP session. This answer (see the comment in the accepted answer) resolved the issue for me: https://superuser.com/questions/1288469/remote-windows-server-virtual-machine-always-keep-desktop-open-simulate-rdp-se

jlintusaari avatar Mar 17 '20 14:03 jlintusaari