-
Notifications
You must be signed in to change notification settings - Fork 60
translator.clean_cache() errors because services weren't instantiated #104
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Not sure if this package is being actively maintained, but I found an error where
translator = Translator()
translator.clean_cache()errors with
TypeError: BaseTranslator.clean_cache() missing 1 required positional argument: 'self'
because translator's underlying services have not been instantiated. My workaround was
for i, service in enumerate(translator.services):
translator._instantiate_translator(service, translator.services, i)
for service in translator.services:
service.clean_cache()but this still fails on Microsoft and Bing translators (although this part may be my fault, maybe it needs some sort of request argument that I didn't pass; not sure), so I just removed them from my services list.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working