Aug-22-2018, 09:15 PM
I've been getting this weird error that seems to be unfounded:
Adding two print statements, like this:
# class.py class Name(Parent): def __init__(self, dictionary): self.dictionary = dictionary . . . # loaded_file.py from . import class.py dictionary = {...} ClassName = Name(dictionary)Here's the error:
TypeError: __init__() missing 1 required positional argument: 'dictionary'
Adding two print statements, like this:
# class.py class ... def __init__(dictionary): print(dictionary) self.dictionary = dictionary print(self.dictionary) . . .yields the same error, with the passed-in dictionary being printed out. Can anyone explain this to me?