BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
995 stars 88 forks source link

Black image after screenshot: Windows Server 2016 , Python 3.6.0 #67

Open codingsett opened 6 years ago

codingsett commented 6 years ago

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

Upvote & Fund

Fund with Polar

BoboTiG commented 6 years ago

Hello,

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

codingsett commented 6 years ago

@BoboTiG The screensaver is disabled but the issue still persists

BoboTiG commented 6 years ago

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.

jaguilera commented 5 years ago

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

BoboTiG commented 4 years ago

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

Could you confirm?

jlintusaari commented 4 years ago

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

jlintusaari commented 4 years ago

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