import pyautogui
DangTruong2

i tried to import pyautogui on replit and it return :

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 1, in <module>
import pyautogui
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyautogui/init.py", line 249, in <module>
import mouseinfo
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/mouseinfo/init.py", line 223, in <module>
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/xauth.py", line 43, in init
raw = open(filename, 'rb').read()
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.Xauthority'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 1, in <module>
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/xauth.py", line 43, in init
raw = open(filename, 'rb').read()
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.Xauthority'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 1, in <module>
import pyautogui
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyautogui/init.py", line 249, in <module>
import mouseinfo
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/mouseinfo/init.py", line 223, in <module>
_display = Display(os.environ['DISPLAY'])
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/display.py", line 80, in init
self.display = _BaseDisplay(display)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/display.py", line 62, in init
display.Display.init(*(self, ) + args, **keys)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/protocol/display.py", line 60, in init
auth_name, auth_data = connect.get_auth(self.socket,
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/support/connect.py", line 91, in get_auth
return mod.get_auth(sock, dname, host, dno)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/support/unix_connect.py", line 103, in new_get_auth
au = xauth.Xauthority()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Xlib/xauth.py", line 45, in init
raise error.XauthError('~/.Xauthority: %s' % err)
Xlib.error.XauthError: ~/.Xauthority: [Errno 2] No such file or directory: '/home/runner/.Xauthority'

can someone help me ;(

You are viewing a single comment. View All
CodingElf66

@DangTruong2 There's a Check Mark next to my answer, you just press on it.