I'm just learning to code in Python / Selenium.
I achieved the first basic thing I wanted to do, but I have a problem regarding a script within a Windows batch that works fine on one PC but not on the other, and although I read a lot I still don't understand why!
I created a script which works with a settings file.
I try to retrieve it with this piece of code :
with open(str(sys.argv[1]), "r") as settings:
and I batch the call to the script within a .cmd file as follows :
start "py" "script.py" "script1.txt"
start "py" "script.py" "script2.txt"
On a first computer, everything works, the script is correctly been launched twice, each time with the correct setting file.
On a second computer:
DevTools listening on ws://127.0.0.1:52471/devtools/browser/f0cc9389-d887-4d48-ab52-87d10f867d5a
Traceback (most recent call last):
File "C:\Users\Jeremie\Dropbox\perso\TIX\script.py", line 19, in <module>
with open(str(sys.argv[1]), "r") as settings:
IndexError: list index out of range
How can this be?
The computers are both on Windows 10.