diff --git a/evennia/contrib/rplanguage.py b/evennia/contrib/rplanguage.py index 037b959741..aea87bf450 100644 --- a/evennia/contrib/rplanguage.py +++ b/evennia/contrib/rplanguage.py @@ -333,7 +333,7 @@ class LanguageHandler(DefaultScript): new_word = '' else: # use random word length - wlen = choice(grammar.keys()) + wlen = choice(list(grammar.keys())) if wlen: structure = choice(grammar[wlen]) diff --git a/evennia/utils/utils.py b/evennia/utils/utils.py index c83a1a0a5a..410d32e66f 100644 --- a/evennia/utils/utils.py +++ b/evennia/utils/utils.py @@ -34,6 +34,12 @@ _EVENNIA_DIR = settings.EVENNIA_DIR _GAME_DIR = settings.GAME_DIR +# ModuleNotFoundError only in py3.6, handle both +try: + from builtins import ModuleNotFoundError +except ImportError: + ModuleNotFoundError = ImportError + ENCODINGS = settings.ENCODINGS _GA = object.__getattribute__ _SA = object.__setattr__