Closed igoralves1 closed 2 years ago
Found the solution.
This issue is causing a problem in many others functions as well (Not all).
Solution:
At the Ubuntu 22.04 login page, Switch to Xorg using the gear/cog in the login -> Password screen at the bottom right corner.
I am testing the Pyautogui on a OS Ubuntu 22.04 in 2 different computers. Both ate presenting the same behavior.
When I use
print(pt.screenshot('foo.png'))
it is creating a blackfoo.png
file.I am new using this library. Maybe there are some configuration for linux/Ubuntu 22.04 that is escaping from my attention. It is like if the code would not have access to the screen (I dont know), some permission.
This is the python code I am using to test:
This is the output from the lines that generate the file (just after the loop):
This is my pip3 list:
And this is my OS/Python:
Attached the file black
foo.png
it is generating.It should be one of these 2 screens attached:
Some Idea what that could that be or what I am missing?