I'm writing a script to fill a monthly tax form using pyautogui.
There are 2 images to be clicked on.
Issue
I'm getting the following error on the second one:
PS C:\Users\Rodrigo\OneDrive\Documentos\Python> & C:/Users/Rodrigo/AppData/Local/Programs/Python/Python310/python.exe c:/Users/Rodrigo/OneDrive/Documentos/Python/SIFERE/saf.py
Traceback (most recent call last):
File "c:\Users\Rodrigo\OneDrive\Documentos\Python\SIFERE\saf.py", line 16, in <module>
pyautogui.click('SIFERE/agrega_saf.png')
File "C:\Users\Rodrigo\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 598, in wrapper
returnVal = wrappedFunction(*args, **kwargs)
File "C:\Users\Rodrigo\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 980, in click
x, y = _normalizeXYArgs(x, y)
TypeError: cannot unpack non-iterable NoneType object
PS C:\Users\Rodrigo\OneDrive\Documentos\Python>
Code
import pyautogui, time
time.sleep(3)
anio='2015'
mes='abril'
secuencia='1'
monto='1234.56'
pyautogui.click('SIFERE/periodo.png')
pyautogui.press('tab')
pyautogui.write(anio)
pyautogui.press('tab')
pyautogui.write(mes)
pyautogui.press('tab')
pyautogui.write(secuencia)
pyautogui.press('tab')
pyautogui.write(monto)
pyautogui.click('SIFERE/agrega_saf.png')
I've copied that exact same line to another py file and it works, but not on this one.