I have almost reached a solution.
TypeError: unhashable type: 'list'
What could be the problem?
class TestSuites(unittest.TestCase): def firstHagerTest(self): argumentsList = [] #creates empty list for i in sys.argv: #iterates trough arguments and adds them to list argumentsList.append(i) argumentsList.pop(0) #remove first argument because it's the path to the script by default HagercadLogger.Logger.Log(HagercadLogger.LEVEL_WARNING, "PRINT MY ARGS LIST: " + ', '.join(argumentsList)) #prints the list #map(str, argumentsList) #results = [f() for f in argumentsList] try: func_to_run = globals()[argumentsList] #i have to find a way to make this line work as the line func_to_run2 somehow, and of course no matter the no. of elements #func_to_run2 = globals()[HagercadUtilities.Utilities.startApp(), HagercadSteps.Steps.createNewProject()] #this work ok except KeyError: passIf I execute the script with func_to_run2 where the steps are harcoded it works. But if I run with my list inside wich also contains the same steps i get and error like this:
TypeError: unhashable type: 'list'
What could be the problem?