1

I try to take a screenshot and display it with the following code:

import pyautogui

im = pyautogui.screenshot()
im.show()

but it says in the console Access is denied. and pops a windows error: enter image description here

same error if i save the picture and try to double click it from the explorer (not with python), but I can open it with sublime text for some reason.

code used for saving:

import pyautogui
import PIL

im = pyautogui.screenshot()
im.save(r'screenshot1.png')
im = PIL.Image.open(r'screenshot1.png')
im.show()

how do i solve this? should i change permissions on taking the screenshot somehow?

1 Answer 1

1

You need to change the startup type of your Windows license management service. Search for "Services" in your computer, and open the Services Management. Find the Windows license management service, and change the startup type to "Automatic". Press "apply" and "ok". Refer to this for visualization of the process.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.