diff --git a/questions.py b/questions.py index 3c80f40..b8c72df 100644 --- a/questions.py +++ b/questions.py @@ -56,7 +56,7 @@ class QuestionsPool(dict): def add_from_files(self, files, path='.'): for filename in files: try: - with open(os.path.normpath(os.path.join(path, filename)), 'r') as f: + with open(os.path.normpath(os.path.join(path, filename)), 'r', encoding='utf-8') as f: questions = yaml.load(f) except(FileNotFoundError): print('[ ERROR ] Questions file "{0}" not found.'.format(filename)) diff --git a/test.py b/test.py index 6a3c31d..e067838 100644 --- a/test.py +++ b/test.py @@ -47,7 +47,7 @@ def read_configuration(filename, debug=False, show_points=False, show_hints=Fals # where to put the students answers (optional) if 'answers_dir' not in test: - print('[ WARNG ] Missing "answers_dir" in the test configuration file "{0}".\n Tests are NOT being saved. Grades are still being inserted into the database.'.format(filename)) + print('[ WARNG ] Missing "answers_dir" in the test configuration file "{0}".\n Tests are NOT being saved. Grades are still going into the database.'.format(filename)) test['save_answers'] = False else: test['answers_dir'] = os.path.normpath(os.path.expanduser(str(test['answers_dir']))) -- libgit2 0.21.2