Python Forum
pyautogui attribuyes not found - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: pyautogui attribuyes not found (/thread-32634.html)



pyautogui attribuyes not found - rfresh737 - Feb-22-2021

I'm fairly new to python programming. I installed pyautogui.

I was just starting a basic tutorial on using it with these two lines:

import pyautogui
print(pyautogui.size())
and I get an error saying size is not an attribute.

How can I tell if my installation was successful?

Thank you...


RE: pyautogui attribuyes not found - deanhystad - Feb-23-2021

The import not raising an exception is a good sign. What do rou see if you type
Output:
>>>import pyautogui dir(pyautogui)



RE: pyautogui attribuyes not found - rfresh737 - Feb-23-2021

>>>import pyautogui
bash: import: command not found

I put

import pyautogui
print(dir(pyautogui))

into a script and ran it:
pi@raspberrypi:~ $ nano pyautogui.py
pi@raspberrypi:~ $ python pyautogui.py
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'pyautogui']
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'pyautogui']
pi@raspberrypi:~ $


RE: pyautogui attribuyes not found - deanhystad - Feb-23-2021

That does not look right. I would expect to see a bunch of function names. You can also try
Output:
>>>import pyautogui >>>help(pyaugogui)
I don't think you have the package installed correctly. Did you use pip? What platform are you using? What version of Python?


RE: pyautogui attribuyes not found - rfresh737 - Feb-23-2021

I'm using Python 3.7
Raspberry Pi 4
I used pip3 to install it.

When I run help(pyautogui) in my nano script:

Help on Module pyautogui:
NAME
pyautogui

FILE
/home/pi/pyautogui.py
NONE

The above displays twice for each script run.

How do I remove what I have and I'll try to reinstall it again.


RE: pyautogui attribuyes not found - rfresh737 - Feb-23-2021

My re-install was successful...yahoo!!!


RE: pyautogui attribuyes not found - deanhystad - Feb-24-2021

Did you identify why the old install failed?


RE: pyautogui attribuyes not found - rfresh737 - Apr-14-2021

(Feb-24-2021, 12:01 AM)deanhystad Wrote: Did you identify why the old install failed?

Sorry, no I did not.