I do not understand what he wants from me:
TypeError: date_generator() missing 1 required positional argument: 'self'
import random class format_creator: def random_string(self, string): return string[random.randint(0,len(string)-1)] def date_generator(self): hashtag_on_off = ('', '#') result = self.random_string(hashtag_on_off) return result Please help out friends!
import presets_generator #название файла с проблемным классом preset = presets_generator.format_creator result = preset.date_generator() print(result) TypeError: date_generator() missing 1 required positional argument: 'self' This is how I call this method through a class object in another file. I get the same error. I understand that the error is that I somehow do not correctly call a function from a function of the same class.
self.date_generator(). - insolor