I have one small python script called genData that contains a function genWork that takes 5 arguments. In another script, I do
from genData import genWork
and then call the function genWork(1, 2, 3, 4, 5). That worked just fine, and the other script runs as expected.
I then edited the function genWork in the genData file and it now takes 7 arguments. I keep the same import lines in the other script, and use the function as genWork(1, 2, 3, 4, 5, 6, 7). I get the error:
TypeError: genWork() takes exactly 5 arguments (7 given)
So, I am guessing somehow the genData script did not actually update? I tried deleting the .pyc file that got created, but I still get the same error.
sys.argvrelated comparison somewhere in the file?