In my code, the following error triggered, and I do not understand how this case can come up:
if(len(sys.argv) > 0):
doSomething()
else:
raise AttributeError("Could not parse script name")
The above code is in a python class, which I import and use in some script. I use the same class with the same call in other scripts, and it works just fine everywhere else. FYI, my OS is ubuntu.
How is it even possible that len(sys.argv) is <= 0?