Traceback (most recent call last):
File “C:\Users\hemil\Downloads\fun-clicker-bot-text-1.py”, line 24, in
pg.typewrite(randSeed)
File “C:\Users\hemil\AppData\Local\Programs\Python\Python39\lib\site-packages\pyautogui_init_.py”, line 586, in wrapper
returnVal = wrappedFunction(*args, **kwargs)
File “C:\Users\hemil\AppData\Local\Programs\Python\Python39\lib\site-packages\pyautogui_init_.py”, line 1665, in typewrite
for c in message:
TypeError: ‘int’ object is not iterable
The random.randint function returns an integer, for example 15. But pyautogui.typewrite expects a string, and emulates the corresponding key presses. The integer 15 is an object you can do arithmetic on. The string "15" is different: it is a sequence containing the characters 1 and 5. For instance:
>>> 15 + 16
31
>>> "15" + "16"
'1516'
You probably want to convert your integer into a string first using: