Home python TracEBack error: File "C:

TracEBack error: File “C:

Author

Date

Category

Pyautogui library does not want to work normally and gives errors

import pyautogui
Import Time.
i = 1.
While I & LT; 1000:
  i = i + 1
Time.Sleep (5)
pyautogui.moveto (453, 1012)
Pyautogui.Click ()
Pyautogui.Write ('Hello World!', Interval = 0.1)
pyautogui.press ('Enter')

Here is the entire error code

traceback (most recent call last):
 File "C: \ users \ PC \ desktop \ spam.py", Line 1, in & lt; module & gt;
  Import pyautogui.
 File "C: \ Users \ PC \ APPDATA \ Roaming \ Python \ Python37 \ Site-Packages \ Pyautogui \ __ init__.py", Line 221, in & lt; module & gt;
  LocateOnWindow .__ doc__ = pyscreeze.locateonwindow .__ doc__
AttributeError: Module 'Pyscreeze' Has No Attribute 'LocateonWindow'

Code was written in Visual Studio, and as a compiler used Thonny


Answer 1, Authority 100%

Set the

modules

pyscreeze
Pymsgbox.
Pytweening.

If it does not help you may not have a faithful version of Python. Use 3.8

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions