wilddom / memrise2anki-extension

An extension for Anki 2 that downloads and converts a course from Memrise into an Anki deck.
ISC License
159 stars 22 forks source link

New Import Issue After Latest Update #48

Closed BaneOfRome closed 7 years ago

BaneOfRome commented 7 years ago

Hello, and thank you not only for the plug-in, but for your continued support of it.

After the latest update, I was able to successfully import a course, but then came across the following error when I tried to import a second different course. The only thing I can think of is that the second course starts (and ends) with multimedia levels (both are just text). Although such levels never provided an issue in the past, perhaps something has changed that now needs to be accounted for within the code. I may be wrong, but it could be a starting point when you go to look into the issue.

Traceback (most recent call last): File "C:\Users...\AppData\Roaming\Anki2\addons\Memrise_Course_Importer\importer.py", line 146, in run course = self.memriseService.loadCourse(self.url, MemriseCourseLoader.Observer(self)) File "C:\Users...\AppData\Roaming\Anki2\addons\Memrise_Course_Importer\memrise.py", line 776, in loadCourse return courseLoader.loadCourse(self.getCourseIdFromUrl(url)) File "C:\Users...\AppData\Roaming\Anki2\addons\Memrise_Course_Importer\memrise.py", line 565, in loadCourse levelData = self.service.loadLevelData(course.id, 1) File "C:\Users...\AppData\Roaming\Anki2\addons\Memrise_Course_Importer\memrise.py", line 785, in loadLevelData raise LevelNotFoundError("Level not found: {}".format(levelIndex)) Memrise_Course_Importer.memrise.LevelNotFoundError: Level not found: 1

Thank you again for your continued work on this add-on. Keep up the great work!

wilddom commented 7 years ago

So far the first level was used to get basic data (e.g. course title, level count). After the latest changes on memrise's side a multimedia level returns HTTP status 400. So a multimedia level at the very beginning of a course is a problem I'll have to fix.

BaneOfRome commented 7 years ago

Thank you for the timely fix! It is working now.