Romern / syncMyMoodle

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

Crashes when syncing specific course #21

Closed CryptKid closed 3 years ago

CryptKid commented 3 years ago

Syncing generally works very reliably on my machine but on every run so far the script crashed when it arrived at the course specified below (all other courses seem to work fine)

Unfortunately i can't provide you with more than the traceback

Syncing Erstsemester FS1/1 - Informatik...
Traceback (most recent call last):
  File "./syncMyMoodle.py", line 454, in <module>
    smm.sync()
  File "./syncMyMoodle.py", line 211, in sync
    sectionpath = os.path.join(os.path.expanduser(self.config["basedir"]),self.sanitize(semestername),self.sanitize(coursename),self.sanitize(sectionname))
  File "./syncMyMoodle.py", line 354, in sanitize
    while path[-1] == " ":
IndexError: string index out of range
Romern commented 3 years ago

Should be fixed with https://github.com/Romern/syncMyMoodle/commit/a179e18327e29e9fedff27fb98406e4d3d94e7be . Apparently some sectionname was empty.

CryptKid commented 3 years ago

Thank you, the fix you integrated works and the script finishes fine now