Romern / syncMyMoodle

Synchronization client for RWTH Moodle
GNU General Public License v3.0
72 stars 18 forks source link

KeyError: 'aria-label' #5

Closed nilshee closed 3 years ago

nilshee commented 3 years ago

Hello, I'm getting the following error when running the script:

Syncing Mathematical_Logic_(TU)_11.19269...
Traceback (most recent call last):
  File "syncMyMoodle.py", line 56, in <module>
    sectionname = clean_filename(sec.attrs["aria-label"])
KeyError: 'aria-label

Used Python and Pip:

Performed install steps as provided in the README:

  1. cloned repo
  2. pip install -r requirements.txt
  3. edited config file

No problems here as far as I can tell

config.py

import string
import os

#selected_courses = []
selected_courses = ["https://moodle.rwth-aachen.de/course/view.php?id=8347"]

onlyfetchcurrentsemester = False
replace_spaces_by_underscores = True
enableExperimentalCategories = False
user = "********"
password = "**********"
basedir = "./"
cookie_file = "./session"

params = {
        'lang': 'en' #Titles for some pages differ
}

valid_filename_chars = "-_.() %s%süöäßÖÄÜ" % (string.ascii_letters, string.digits)
char_limit = 255

if not os.path.exists(basedir):
        os.makedirs(basedir)

I tried it on Manjaro and Ubuntu on Windows and on both I'm getting the above error.

Thank you in advance