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:
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?
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.